5,391
edits
(→func i_uh_heheheh: so much for ssg's "overcommented" scripts... sigh) |
(→func final_ambush: overview complete) |
||
Line 589: | Line 589: | ||
} | } | ||
===func final_ambush=== | ===func final_ambush=== | ||
This is triggered by the pre-final [[OBD:BINA/OBJC/CONS|console]] (number 3). That console doesn't do anything else (in particular, it doesn't activate console number 4, because in this case a ''delayed'' activation is needed. Control is taken away from the player with '''input 0''' and given back with '''input 1'''. Actually, this is redundant here because '''begin_cutscene''' and '''end_cutscene''' take care of the player's controls too (along with letterboxing etc). | |||
;Camera stuff | |||
:The camera cuts to a view of console 4 (interpolation over 0 frames to the position and rotation of '''[[OBAN|OBANambush1]]''') after 1 second. Another 2.5 seconds later, console 4 is activated, and then after another 2.5 seconds the actual "ambush" starts: the camera cuts to a view of console 3 (with Konoko still in front of it) and then interpolates over 5 seconds to a view of the final door, '''OBANambush3''': [[cm_interpolate_block]] makes sure that the ''previous'' camera relocation (the cut to '''OBANambush2''') is complete. 50 frames after the camera has reached '''OBANambush3''', it closes in on the door over another 5 seconds ('''OBANambush4'''). The camera stays there until the end of the cutscene, when it focuses back on Konoko. | |||
;Music | |||
:The music starts as the camera cuts back to Konoko's pod and starts panning towards the door. '''func music_script_start''' sets the user variable '''music_counter''' to 2 so that the music stops when and if both Strikers are killed (when either of them is killed, a function is called that decrements the counter). | |||
;Door and locklight | |||
:The [[OBD:BINA/OBJC/DOOR|door]] unlocks to let the Strikers pass and locks behind them (the locklight, looked up in [[ENVP]], changes accordingly). It is later unlocked by console 4. | |||
;Characters | |||
:The Strikers have their movement mode set to "walk", which is only effective after they stop '''playback'''ing and start '''do_path'''ing (they wander off towards the middle of the hangar). The '''i_uh_heheheh1''' triggervolume makes sure they'll retreat to guard the door if Konoko heads for the console that unlocks it (see [[Tutorial/airport1 level logic.bsl#func i_uh_heheheh|func i_uh_heheheh]] below). The purpose of "interp 30" modifier to the '''playback''' command is not clear, as the scene looks just the same without it. | |||
func void final_ambush(string char_index) | func void final_ambush(string char_index) | ||
{ | { | ||
dprint finalambush | [[dprint]] finalambush | ||
input 0 | [[input]] 0 | ||
begin_cutscene | [[begin_cutscene]] | ||
sleep 60 | [[sleep]] 60 | ||
cm_interpolate ambush1 0 | [[cm_interpolate]] ambush1 0 | ||
sleep 150 | sleep 150 | ||
console_activate 4 | [[console_activate]] 4 | ||
sleep 150 | sleep 150 | ||
sound_music_start mus_fitec_hd 0.91 | [[sound_music_start]] mus_fitec_hd 0.91 | ||
music_script_start | [[Tutorial/airport1 level logic.bsl#func music_script_start|music_script_start]] | ||
cm_interpolate ambush2 0 | cm_interpolate ambush2 0 | ||
cm_interpolate_block ambush3 300 | [[cm_interpolate_block]] ambush3 300 | ||
sleep 350 | sleep 350 | ||
cm_interpolate ambush4 300 | cm_interpolate ambush4 300 | ||
door_unlock 14 | [[door_unlock]] 14 | ||
particle door3_locklight01 do start | [[particle]] door3_locklight01 do start | ||
ai2_spawn finalam_striker_1 | [[ai2_spawn]] finalam_striker_1 | ||
ai2_spawn finalam_striker_2 | ai2_spawn finalam_striker_2 | ||
ai2_setmovementmode finalam_striker_1 walk | [[ai2_setmovementmode]] finalam_striker_1 walk | ||
ai2_setmovementmode finalam_striker_2 walk | ai2_setmovementmode finalam_striker_2 walk | ||
playback finalam_striker_1 finalam_striker1 interp 30 | [[playback]] finalam_striker_1 finalam_striker1 interp 30 | ||
playback finalam_striker_2 finalam_striker2 interp 30 | playback finalam_striker_2 finalam_striker2 interp 30 | ||
sleep 300 | sleep 300 | ||
particle door3_locklight01 do stop | particle door3_locklight01 do stop | ||
sleep 300 | sleep 300 | ||
door_lock 14 | [[door_lock]] 14 | ||
ai2_dopath finalam_striker1 finalam_1 1 | [[ai2_dopath]] finalam_striker1 finalam_1 1 | ||
ai2_dopath finalam_striker2 finalam_2 1 | ai2_dopath finalam_striker2 finalam_2 1 | ||
trigvolume_enable i_uh_heheheh1 1 | [[trigvolume_enable]] i_uh_heheheh1 1 | ||
cm_reset | [[cm_reset]] | ||
end_cutscene | [[end_cutscene]] | ||
input 1 | input 1 | ||
} | } | ||
===func i_uh_heheheh=== | ===func i_uh_heheheh=== | ||
This forces 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 from the faraway console. 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 [[OBD:BINA/OBJC/CONS|console]] number 4. That trigger volume is disabled at level start. It's enabled in '''[[BSL:Tutorial/airport1 level logic.bsl#func final_ambush|func final_ambush]]''' (see above), after both Strikers are spawned. Once enabled, it can only be triggered once, and only by the player. | This forces 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 from the faraway console. 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 [[OBD:BINA/OBJC/CONS|console]] number 4. That trigger volume is disabled at level start. It's enabled in '''[[BSL:Tutorial/airport1 level logic.bsl#func final_ambush|func final_ambush]]''' (see above), after both Strikers are spawned. Once enabled, it can only be triggered once, and only by the player. |