MattXR
Dec 8 2006, 15:23
Ok i need this so it works in ArmA
Quote[/b] ];By Doolittle
_vlogic = []
_vtime = []
_count = count vehicles
_delay = 3
_i = 0
#load
_v = vehicles select _i
_vl = "Logic" createVehicle getPos _v
_vl setDir getDir _v
_vlogic = _vlogic + [_vl]
_vtime = _vtime + [0]
_i = _i + 1
?_i < _count : goto "load"
#init
_i = 0
~3
#alive
_v = vehicles select _i
_vl = _vlogic select _i
?alive _v and _vl distance _v < 100 : goto "continue"
?alive _v and count crew _v != 0 : _vtime set [_i, 0]; goto "continue"
_vt = _vtime select _i
?_vt != 0 and _vt < _time : goto "notalive"
?_vt == 0 : _vtime set [_i, _time + _delay]
#continue
_i = _i + 1
?_i < _count : goto "alive"
goto "init"
#notalive
_vtype = typeOf _v
deleteVehicle _v
~1
_v = _vtype createVehicle getPos _vl
_v setDir getDir _vl
vehicles set [_i, _v]
_vtime set [_i, 0]
publicObject = _v
publicVariable "publicObject"
goto "continue"
What its suppost to do, you place a empty vehicle on the map with this code in in the init "vehicles = vehicles + [this]" when the vehicle is moved and destroyed the vehicle will respawn back at its original place after a few moments.
why i want the script im making a HOLD map a big one for many players and im sick atm when all the players get their vehicles destroyed and they don't spawn back and everyone else has to run miles to get to there objective.
Im making a HOLD mission like BIS's HOLD The Castle But Mines Hold Camp Dead http://forums.bistudio.com/oldsmileys/biggrin_o.gif
Quote[/b] ];By Doolittle
_vlogic = []
_vtime = []
_count = count vehicles
_delay = 3
_i = 0
#load
_v = vehicles select _i
_vl = "Logic" createVehicle getPos _v
_vl setDir getDir _v
_vlogic = _vlogic + [_vl]
_vtime = _vtime + [0]
_i = _i + 1
?_i < _count : goto "load"
#init
_i = 0
~3
#alive
_v = vehicles select _i
_vl = _vlogic select _i
?alive _v and _vl distance _v < 100 : goto "continue"
?alive _v and count crew _v != 0 : _vtime set [_i, 0]; goto "continue"
_vt = _vtime select _i
?_vt != 0 and _vt < _time : goto "notalive"
?_vt == 0 : _vtime set [_i, _time + _delay]
#continue
_i = _i + 1
?_i < _count : goto "alive"
goto "init"
#notalive
_vtype = typeOf _v
deleteVehicle _v
~1
_v = _vtype createVehicle getPos _vl
_v setDir getDir _vl
vehicles set [_i, _v]
_vtime set [_i, 0]
publicObject = _v
publicVariable "publicObject"
goto "continue"
What its suppost to do, you place a empty vehicle on the map with this code in in the init "vehicles = vehicles + [this]" when the vehicle is moved and destroyed the vehicle will respawn back at its original place after a few moments.
why i want the script im making a HOLD map a big one for many players and im sick atm when all the players get their vehicles destroyed and they don't spawn back and everyone else has to run miles to get to there objective.
Im making a HOLD mission like BIS's HOLD The Castle But Mines Hold Camp Dead http://forums.bistudio.com/oldsmileys/biggrin_o.gif