OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: Charlotte on 04 Jul 2003, 16:28:12
-
Hello..
In my multiplayer mission I am chassing a civilian, if the civilian dies for any reason how can i make it come back to the game? meaning have just 3 chances to come back to life again, and if so can i set the location were it will return from the death.
Any ideas please!!! thanks to all of you that are always helping me!
xxxxx
-
Mmmmmmmmmmm, I Hope You Love Scripting ;D
Let's Call Your Civilian " Civ "
In A Script, Put This ( With Your Unit Name Of Course ) :
#A
?(Not (Alive Civ):GoTo "B" -> Check If The Civilian Is Die Or Not
~1 -> Wait 1 Second
GoTo "A" -> Go To The Top Of The Script If The Civilian Is Alive
#B
_A = Random 3 -> Choose Randomly A Number Between 1,2 And 3
?(_A = 1):GoTo "01" -> If The Number It's 1, Go To #01
?(_A = 2):Exit -> If The Number Is 2, Civilian Will Not Relive
?(_A = 3):Exit -> If The Number Is 3, Civilian Will Not Relive
#01
~10 -> Wait 10 Sec
Civ SetDammage 0 -> Civilian Will Be No Injuried
Civ GetMarkerPos "Here" -> Civilian Will Relive At The Marker Named Here
GoTo "A" -> Looping The Script
It's Pretty Easy, Isn't It ??? ;D
Don't Forget To Put A Marker Where You Want To The Civilian Relive And To Name It Here, You Can Hide The Marker In Game With Putting This In A Init.sqs File In YOur Mission Directory -> "Here" SetMarkerSize [0,0] <-
I Hope I'm Helping You A Lot 8)