Echo Ranger 449
January 2nd, 2008, 01:04 PM
I'm currently trying to make a "bonus scene" in the silent cartographer.
The title of it will be "Ambushed"
Summary of events
------
After the player has unlocked the security door and is now walking inside the outside entrance to the silent cartographer, an sword elite will fly down.
If the player tries to avoid the elite, he will find that there is a door that's locked (I made the necessary scenery to make adjustments for the difference in the door frame's size).
If the player kills the elite whilst still flying, then the door will unlock.
If the player causes the elite to engage him and enter the custom-made trigger at the front entrance, the elite will get out, execute a command list, then proceed to attempt to kill the player. When the player kills the him, the doors will unlock.
-----------------------
Notes:
doors that open when you approach are (I believe) called "small door", doors that open and close after being told to in the script are called "small door platform".
Now I could just use the small door platform, but before the player enters that part of the mission, I want the door to open and close as normal.
So here is what I did-
I used the small door before and after the scene. the "ambushed" door is the small door platform. When the ambushed mission begins, the old door is destroyed and the ambushed door is created. After the mission ends, the same thing happens.
My main issue is that I cannot make the "if banshee is killed or (banshee pilot gets out and gets killed), then unlock door" work.
I need to create an "if this then that" condition that will loop the "if ai_living_count equals 0" until it is met.
My problem was that I told the scenario "if commander gets out and is killed by player, then open door"- this means however, that if the player kills the elite before he gets out and executes the command list, the door won't open.
trigger: trigger1
encounter: angrycmder/commander
vehicle: shee1
command list: cmd1
door 1: before
door during the ambush scene: ambush door
door 3: after
(object_destroy before)
(object_create ambush_door)
(object_create shee1 )
(ai_place angrycmder/commander )
(sleep_until (volume_test_object trigger1 shee1 ))
(ai_exit_vehicle angrycmder/commander )
(ai_command_list angrycmder/commander cmd1 )
(sleep until (= 0 (ai_living_count angrycmder/commander)))
(object_destroy ambush_door )
(object_create after )
Now, if I put (sleep until (= 0 (ai_living_count angrycmder/commander)))
between "ai_place" and "sleep_until volume..." would that help?
I think if I did that, the sleep_until script would keep the others from running until the commander dies.
This is why I think the "if" statement would be better than "sleep until". However, for some reason I keep setting it up wrong because when I compile the script, sapien tells me "I expected a boolean function, but got a "void" value instead for "object_destroy ambush_door".
The title of it will be "Ambushed"
Summary of events
------
After the player has unlocked the security door and is now walking inside the outside entrance to the silent cartographer, an sword elite will fly down.
If the player tries to avoid the elite, he will find that there is a door that's locked (I made the necessary scenery to make adjustments for the difference in the door frame's size).
If the player kills the elite whilst still flying, then the door will unlock.
If the player causes the elite to engage him and enter the custom-made trigger at the front entrance, the elite will get out, execute a command list, then proceed to attempt to kill the player. When the player kills the him, the doors will unlock.
-----------------------
Notes:
doors that open when you approach are (I believe) called "small door", doors that open and close after being told to in the script are called "small door platform".
Now I could just use the small door platform, but before the player enters that part of the mission, I want the door to open and close as normal.
So here is what I did-
I used the small door before and after the scene. the "ambushed" door is the small door platform. When the ambushed mission begins, the old door is destroyed and the ambushed door is created. After the mission ends, the same thing happens.
My main issue is that I cannot make the "if banshee is killed or (banshee pilot gets out and gets killed), then unlock door" work.
I need to create an "if this then that" condition that will loop the "if ai_living_count equals 0" until it is met.
My problem was that I told the scenario "if commander gets out and is killed by player, then open door"- this means however, that if the player kills the elite before he gets out and executes the command list, the door won't open.
trigger: trigger1
encounter: angrycmder/commander
vehicle: shee1
command list: cmd1
door 1: before
door during the ambush scene: ambush door
door 3: after
(object_destroy before)
(object_create ambush_door)
(object_create shee1 )
(ai_place angrycmder/commander )
(sleep_until (volume_test_object trigger1 shee1 ))
(ai_exit_vehicle angrycmder/commander )
(ai_command_list angrycmder/commander cmd1 )
(sleep until (= 0 (ai_living_count angrycmder/commander)))
(object_destroy ambush_door )
(object_create after )
Now, if I put (sleep until (= 0 (ai_living_count angrycmder/commander)))
between "ai_place" and "sleep_until volume..." would that help?
I think if I did that, the sleep_until script would keep the others from running until the commander dies.
This is why I think the "if" statement would be better than "sleep until". However, for some reason I keep setting it up wrong because when I compile the script, sapien tells me "I expected a boolean function, but got a "void" value instead for "object_destroy ambush_door".