00a401000000 |
Set property for actor $self: 1:01000000 (unknown prop) |
008a64 |
Set alertness to 100 |
0007041d |
When shot/hit, assign function 041d - President running |
00b5524553544152540a00 |
// RESTART |
0003 |
Yield |
0033fd08 |
If $self is dying/dead goto 08 |
0034fd08 |
If $self has finished death animation goto 08 |
017bfd08 |
If $self's body has disappeared goto 08 |
000031 |
Go to next 31 |
000208 |
Label 08 |
00070000 |
When shot/hit, assign function 0000 - Idle |
00b6 |
Reset and start cycle counter |
00029c |
Label 9c |
0003 |
Yield |
00b54b494c4c45440a00 |
// KILLED |
00bd00000f08 |
If cycle counter > 15 (0.2 secs) goto 08 |
00019c |
Go to first 9c |
000208 |
Label 08 |
017c1abf06 |
Set sound 1abf to channel 6 (does not play) |
017906fd00010bb8177001 |
Play sound in slot by $self |
00070000 |
When shot/hit, assign function 0000 - Idle |
0005fd0000 |
Assign function 0000 - Idle to $self and advance frame |
000231 |
Label 31 |
00b5623420736869656c6420636865636b0a00 |
// b4 shield check |
0083fd08 |
If $self shot (while recoiling?) goto 08 |
00009d |
Go to next 9d |
000208 |
Label 08 |
00b6 |
Reset and start cycle counter |
017c1ac206 |
Set sound 1ac2 to channel 6 (does not play) |
017906fd00010bb8177001 |
Play sound in slot by $self |
00029e |
Label 9e |
0003 |
Yield |
00b5494e4a555245440a00 |
// INJURED |
007d0108 |
If actor shot less than 1 times goto 08 |
00bc00001408 |
If cycle counter < 20 (0.3 secs) goto 08 |
000208 |
Label 08 |
00329d |
If actor has stopped moving goto 9d |
00019e |
Go to first 9e |
00029d |
Label 9d |
0009 |
Actor stops travelling |
00b6 |
Reset and start cycle counter |
00029f |
Label 9f |
0003 |
Yield |
00b5574149540a00 |
// WAIT |
005bfd000014a5 |
If $self is in room/pad 14 goto a5 |
005bfd000014a5 |
If $self is in room/pad 14 goto a5 |
005bfd000014a5 |
If $self is in room/pad 14 goto a5 |
005bfd000014a5 |
If $self is in room/pad 14 goto a5 |
005bfd000014a5 |
If $self is in room/pad 14 goto a5 |
00b57461726765740a00 |
// target |
003f08 |
If $player is in line of sight goto 08 |
0000a0 |
Go to next a0 |
000208 |
Label 08 |
00bd0004e231 |
If cycle counter > 1250 (20.8 secs) goto 31 |
00530014a0 |
If actor is further than 20 units from player goto a0 |
00019f |
Go to first 9f |
000231 |
Label 31 |
0036 |
Call RNG |
00374031 |
If random byte < 64 goto 31 |
00019d |
Go to first 9d |
000231 |
Label 31 |
00019d |
Go to first 9d |
000208 |
Label 08 |
00019d |
Go to first 9d |
0002a0 |
Label a0 |
00b6 |
Reset and start cycle counter |
000231 |
Label 31 |
0053001e31 |
If actor is further than 30 units from player goto 31 |
002ba1 |
Run to Jo with hand up (eg. in rain), then goto a1 |
000231 |
Label 31 |
002da1 |
Run to Jo, then goto a1 |
0002a1 |
Label a1 |
0003 |
Yield |
00b5464f4c4c4f570a00 |
// FOLLOW |
005bfd000014a5 |
If $self is in room/pad 14 goto a5 |
005bfd000014a5 |
If $self is in room/pad 14 goto a5 |
005bfd000014a5 |
If $self is in room/pad 14 goto a5 |
005bfd000014a5 |
If $self is in room/pad 14 goto a5 |
005bfd000014a5 |
If $self is in room/pad 14 goto a5 |
0052000aa2 |
If actor is within 10 units of $player goto a2 |
0032a2 |
If actor has stopped moving goto a2 |
00bd00016831 |
If cycle counter > 360 (6.0 secs) goto 31 |
0001a1 |
Go to first a1 |
000231 |
Label 31 |
0001a0 |
Go to first a0 |
000208 |
Label 08 |
0001a0 |
Go to first a0 |
0002a2 |
Label a2 |
00019d |
Go to first 9d |
0002a3 |
Label a3 |
002da4 |
Run to Jo, then goto a4 |
0002a4 |
Label a4 |
0003 |
Yield |
00b552554e4e464f0a00 |
// RUNNFO |
005bfd000014a5 |
If $self is in room/pad 14 goto a5 |
005bfd000014a5 |
If $self is in room/pad 14 goto a5 |
005bfd000014a5 |
If $self is in room/pad 14 goto a5 |
005bfd000014a5 |
If $self is in room/pad 14 goto a5 |
005bfd000014a5 |
If $self is in room/pad 14 goto a5 |
0001a4 |
Go to first a4 |
0002a6 |
Label a6 |
00019d |
Go to first 9d |
0002a5 |
Label a5 |
00200105 |
Run to pad 0105 |
00020b |
Label 0b |
0003 |
Yield |
003208 |
If actor has stopped moving goto 08 |
00010b |
Go to first 0b |
000208 |
Label 08 |
0009 |
Actor stops travelling |
010bfd80 |
Make $self ally (10) or foe (02) |
0145 |
Set actor AI |
0146 |
Set actor AI |
00a3000010000131 |
If flag #13 (Objective complete: Locate and rescue President) is true goto 31 |
00cbf60a19 |
Display text in bottom left for player: President has been rescued.
|
00a100001000 |
Set flag #13 (Objective complete: Locate and rescue President) |
000231 |
Label 31 |
0005fd0000 |
Assign function 0000 - Idle to $self and advance frame |
0004 |
End of function |
For simplicity, this annotation ignores code relating to the president being injured.
The president can be in one of several statuses: InSight, RunningToJo or RunningToFinalPad.
Function ChooseStatus:
Stop moving
Restart timer
If in room 0x14 (same "room" as UFO), change status to RunningToFinalPad
If player in sight, change status to InSight
Else change status to RunningToJo
Status InSight:
If been InSight for 20 seconds, run ChooseStatus() again
If within 20 units of Jo:
- If in room 0x14 (same "room" as UFO), change status to RunningToFinalPad
- If player not in sight, change status to RunningToJo
If further than 20 units of Jo, change status to RunningToJo
Status RunningToJo:
Restart timer
Sample Jo's location and start running to it (if within 30 units of Jo, have hand up/forward while running)
While running:
- If in room 0x14 (same "room" as UFO), change status to RunningToFinalPad
- If within 10 units of Jo, ChooseStatus()
- If stopped moving (eg. reached the sampled location), ChooseStatus()
- If been following for 6 seconds, restart the RunningToJo status (ie. resample Jo's location)
Status RunningToFinalPad:
Run to pad
Wait until stopped
Set objective complete