BSL:Tutorial/airport1 level logic.bsl: Difference between revisions

m
(just reverting the damn thing while adding a few comments)
Line 635: Line 635:
==### DOOR LOCK LIGHTS ###==
==### DOOR LOCK LIGHTS ###==
===func change_terminaldoor_light===
===func change_terminaldoor_light===
A typical door-unlocking function, called from [[OBD:BINA/OBJC/CONS|console]] number 1. Control is taken away from the player with '''input 0''' and given back with '''input 1'''. The camera instantly moves (interpolates over 0 frames) to the position and orientation specified by '''[[OBANdoor1]]''' and refocuses on the player 3.5 seconds later. In the meantime, the '''door1_locklight01''' particle (looked up in '''[[ENVP]]''') turns on, whereby the apparent light changes from red to green. Note that the door (number 2) is unlocked directly by the console, so there's no need for a '''door_unlock 2''' here.
A typical door-unlocking function, called from [[OBD:BINA/OBJC/CONS|console]] number 1. Control is taken away from the player with '''input 0''' and given back with '''input 1'''. The camera instantly moves (interpolates over 0 frames) to the position and orientation specified by '''[[OBAN|OBANdoor1]]''' and refocuses on the player 3.5 seconds later. In the meantime, the '''door1_locklight01''' particle (looked up in '''[[ENVP]]''') turns on, whereby the apparent light changes from red to green. Note that the door (number 2) is unlocked directly by the console, so there's no need for a '''door_unlock 2''' here.
  func void change_terminaldoor_light(void)
  func void change_terminaldoor_light(void)
  {
  {
Line 647: Line 647:
  input 1
  input 1
  }
  }
===func change_door2_light===
===func change_door2_light===
Same as above except before giving control back to the player, the objective and compass target are updated (by user functions). This is called from [[OBD:BINA/OBJC/CONS|console]] number 2, and the [[OBD:BINA/OBJC/DOOR|door]] (number 10) is also unlocked directly by the console.
Same as above except before giving control back to the player, the objective and compass target are updated (by user functions). This is called from [[OBD:BINA/OBJC/CONS|console]] number 2, and the [[OBD:BINA/OBJC/DOOR|door]] (number 10) is also unlocked directly by the console.