5,389
edits
(just reverting the damn thing while adding a few comments) |
|||
Line 2: | Line 2: | ||
|__TOC__ | |__TOC__ | ||
|} | |} | ||
=### AIRPORT 1 LEVEL LOGIC ###= | |||
==### START, SAVE & OBJECTIVES ###== | |||
===func func_start=== | |||
func void func_start(string ai_name) | |||
{ | { | ||
[[dprint]] start_active | [[dprint]] start_active | ||
Line 629: | Line 625: | ||
} | } | ||
===func i_uh_heheheh=== | ===func i_uh_heheheh=== | ||
That thing is supposed to force the two Red Strikers from the final fight to retreat to the end-of-level door when and if Konoko is about to unlock it. The [[TRGV|trigger volume]] responsible for this is '''i_uh_heheheh1''' (number 6): '''func i_uh_heheheh''' is its '''entry''' function; it spans the stairs that lead to the final console. It is disabled at level start and is never enabled, so the following function is never actually called in the original Oni. If you want to experiment with it, just do '''trigvolume_enable i_uh_heheheh1 1''' after the Strikers are spawned, make a run for the console and see them do their "strategic retreat". | |||
:Note the typically inconsistent '''string char_index''' parameter: actually the ''name'' of the character who fired the trigger volume function. | |||
func void i_uh_heheheh(string char_index) | func void i_uh_heheheh(string char_index) | ||
{ | { | ||
dprint iuh_heheheh | [[dprint]] iuh_heheheh | ||
ai2_dopath finalam_striker_1 strategic_retreat1 | [[ai2_dopath]] finalam_striker_1 strategic_retreat1 | ||
ai2_dopath finalam_striker_2 strategic_retreat2 | ai2_dopath finalam_striker_2 strategic_retreat2 | ||
} | } | ||
==### 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. | |||
func void change_terminaldoor_light(void) | func void change_terminaldoor_light(void) | ||
{ | { | ||
Line 649: | Line 648: | ||
} | } | ||
===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. | |||
func void change_door2_light(void) | func void change_door2_light(void) | ||
{ | { | ||
dprint door2 | [[dprint]] door2 | ||
input 0 | [[input]] 0 | ||
cm_interpolate door2 0 | [[cm_interpolate]] door2 0 | ||
sleep 60 | [[sleep]] 60 | ||
particle door2_locklight01 do start | [[particle]] door2_locklight01 do start | ||
sleep 150 | sleep 150 | ||
set_objective_3 | [[BSL:Tutorial/airport1_level_logic.bsl#func set_objective_3|set_objective_3]] | ||
set_target_6 | [[BSL:Tutorial/airport1_level_logic.bsl#func set_target_6|set_target_6]] | ||
cm_reset | [[cm_reset]] | ||
input 1 | input 1 | ||
} | } | ||
===func change_enddoor_light=== | ===func change_enddoor_light=== | ||
Same as above for [[OBAN]] and [[ENVP]] lookup. The '''door_unlock 14''' is redundant here because the [[OBD:BINA/OBJC/CONS|console]] (number 4) actually takes care of unlocking [[OBD:BINA/OBJC/DOOR|door]] number 14 (the final door). There is no unlocking sound so it really doesn't make sense to unlock the door a second time while the camera is close to it. | |||
func void change_enddoor_light(void) | func void change_enddoor_light(void) | ||
{ | { |