
Originally Posted by
zipman
would you mind saying how you fixed it please im having the same thing with the spawn once it blows out the marker drops back to the bottam of the map and i can then only teleport in to water.
any if any one else nows a fix please reply.
thanks
use these scripts to respawning your MHQ(s) with the marker(s)
vehi_respawn.sqs - Myke's respawn script, i just added processInitCommands and the initveh lines.
if you change the script's name, dont forget to do that in the last line as well (and the same for SpawnScript.sqs)!!!
Code:
; Vehicle Respawn Script by {nBs**-Myke-{CO**
; Usage: [this, 60, [0, 0], 180] exec "vehi_respawn.sqs"
; this: refers to the vehicle. Enter vehicle name when not using in Vehicles Init line
; 60: Time until respawn in seconds.
; [0, 0] Enter XY coordinates for manual respawn place setting or just enter 0 (no square brackets) for automatic detection
; 180: Enter Vehicle heading manually. For automatic detection enter 361
; aslong Units are inside, vehicle will not respawn and can be repaired
?! (local server): exit
_vehicle = _this select 0
_delay = _this select 1
_pos = _this select 2
_dir = _this select 3
_initVeh = _this exec "SpawnScript.sqs"
_vehicle setVehicleInit _initVeh
processInitCommands
; defining possible vehicle positions
_driver = _vehicle emptypositions "driver"
_gunner = _vehicle emptypositions "gunner"
_commander = _vehicle emptypositions "Commander"
_crew = _vehicle emptypositions "Cargo"
? (_pos == 0): _startpos = getpos _vehicle
? (_dir == 361): _startdir = getdir _vehicle
#waiting
; waiting for Vehicle is disabled
@ !(canmove _vehicle) &! (canfire _vehicle)
; checking if vehicle still is manned
@ (isnull driver _vehicle) && (isnull gunner _vehicle) && (isnull commander _vehicle)
~_delay
? (canmove _vehicle) && (canfire _vehicle): goto "waiting"
_new = typeof _vehicle
deletevehicle _vehicle
_newveh = _new createvehicle _startpos
_newveh setpos _startpos
_newveh setdir _startdir
[_newveh, _delay, _pos, _dir] exec "vehi_respawn.sqs"
exit
and now the "SpawnScript.sqs" script (forgot the authors name (maybe it was Squuezee, sorry, i forgot your name), found that on a forum)
change "m_WestSpawn1" to your HQ's marker name
Code:
;SpawnScript.sqs
_veh = _this select 0
#Loop
~1
?(!alive _veh):exit
"m_WestSpawn1" setMarkerPos getpos _veh
goto "Loop"
put this into your MHQ's init line:
Code:
[this, 10, 0, 255] exec "vehi_respawn.sqs";
(10 sec respawn delay, 255 azimut)
if you have multiple MHQ's, then you will need 1-1 script for each MHQ.
for example, you have 2 MHQ, then you need "vehi_respawn.sqs", "SpawnScript.sqs" for MHQ1, and "vehi_respawn1.sqs", "SpawnScript1.sqs" for MHQ2, with the proper changes in the scripts (marker name in SpawnScript file and the script names in vehi_respawn)