OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Insanoblan on 24 Sep 2003, 13:56:08

Title: Ending a script.
Post by: Insanoblan on 24 Sep 2003, 13:56:08
How can i make it so that if a soldier dies, a script stops.
The soldiers name is smokey and i want it so when he dies, a script called smokes.sqs stops.

Thanks
Title: Re:Ending a script.
Post by: Knut Erik on 24 Sep 2003, 13:57:40
Like this, m8  ;)

#loop
DoSomeThingFancy
?!Alive smokey : Exit   <== This line checks if the soldier is alive !!  :D
goto "Loop"
Title: Re:Ending a script.
Post by: Insanoblan on 25 Sep 2003, 03:38:31
Thanks alot. It worked out perfectly! I was supried at the start by the "do somethingfancy" thing, but now i get it.

Thanks again