OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: TH on 25 Mar 2004, 03:34:55

Title: Race scripts
Post by: TH on 25 Mar 2004, 03:34:55
hi, I need to know how to make a script for laps for a race and how to add a action to repair a vehicle. If anyone can help itd be appretiated  ;D thx
Title: Re:Race scripts
Post by: WizzyWig on 25 Mar 2004, 04:01:32
ok well its easy

fix unit

add in init line this addaction ["FIX ME","this setdammage 0 **or 1**"]
and for the laps you make a trigger on the finish line and place in the init line this exec "lap.sqs"

lap.sqs
Code: [Select]
_player = player
_lap = _lap+1
hint "LAP number 1%",_lap]
_lap == 3:goto winner
exit
#winner
hint "1% is the winner",_player]
;then have it end the mission or do what you wont it to do

ok this is off the top of my head so dont quote me on this but is a genral idare i wish i was at home ill do it when i get in ok good luck pleae post it when you have sorted it so that i dont have to do it when im in ok good luck
Title: Re:Race scripts
Post by: TH on 25 Mar 2004, 04:16:33
well the fix unit says script bla bla bla not found.. do i have to make a script for it?
Title: Re:Race scripts
Post by: TH on 25 Mar 2004, 04:24:00
im a noob at this so ill wait till u get back to ur own computer :)
Title: Re:Race scripts
Post by: TH on 25 Mar 2004, 07:14:57
i put this addaction ["FIX ME","this setdammage 0 **or 1**"] in the cars init field, is that right? the error i get is script not found
Title: Re:Race scripts
Post by: PheliCan on 31 Mar 2004, 22:25:48
It should be:

this addAction ["FIX ME","this setDammage 0"]

...in the init-field of the car.
Title: Re:Race scripts
Post by: TH on 01 Apr 2004, 23:48:12
cool works now thx, but i need to know how to make checkpoints and 1 lap
Title: Re:Race scripts
Post by: WizzyWig on 02 Apr 2004, 04:39:16
read my post at top