
gamegodlazy
- Screenshot Guru -
Joined: Aug 17, 2006
Please pass the Panda Sauce to me
|
Posted: May 10, 2009 06:00 AM
Msg. 1 of 6
is it possible
to set this up:
in 1 part of my sp you need to rescue 1 pelican pilot and 7 marines is it possible to make 1 script where you restart from the last check point if the pilot dies and if the 5 or more marines die that you restart at the last check point?
|
|
|

Polamee
Joined: Feb 25, 2008
MP2SPMT's founder
|
Posted: May 10, 2009 06:09 AM
Msg. 2 of 6
Yes. Attach AI to bipeds (for the pilot and Marines), create a startup script detecting if one of the biped's unit health is 0, and then use game_revert to take the player back to the last checkpoint.
Why are you asking scripting questions if you don't know how to script yet?
|
|
|

sierra117
Joined: Jan 10, 2008
If sex is good exercise, why are there fat sluts?
|
Posted: May 10, 2009 06:28 AM
Msg. 3 of 6
Quote: --- Original message by: Polamee Why are you asking scripting questions if you don't know how to script yet? he's planning ahead... and yes its possible. As Polamee said. By attaching it to a biped and checking for the bipeds health. Then reverting to the last checkpoint if the biped dies... Its the same way Bungie did it with a50. When your going to the dropship at the end. With Keyes.
|
|
|

gamegodlazy
- Screenshot Guru -
Joined: Aug 17, 2006
Please pass the Panda Sauce to me
|
Posted: May 10, 2009 07:32 AM
Msg. 4 of 6
yeah but what about a serten amount of marines is that possible aswell?
|
|
|

Headhunter09
Joined: May 6, 2008
This is the truth.
|
Posted: May 10, 2009 07:36 AM
Msg. 5 of 6
make a variable, set it to however many marines there are. Name each marine, and set a continuous script to detect when one of them dies, and then subtract one from the variable. The same script has a catch at the end for if the variable is below 2 or something.
|
|
|

Gamma927
Joined: Jun 12, 2008
Steam: gamma927
|
Posted: May 10, 2009 12:05 PM
Msg. 6 of 6
(global short x 0)
(script startup marine ([create the marines]) (set x 1) )
(script continuous health_check (if (= x 1) (begin (sleep_until (> (ai_living_count [marine encounter]) [number]) ([display hud message that says OH NOEZ]) (sleep 150) (game_revert) ) ) )
(script startup done ([boolean to check if the marines made it out alive]) (set x 0) )
|
|
|