requiredVersion "1.91"
? not local Server : exit
; script usage [Soldier,30] exec "soldierRespawn.sqs" in init field of the soldier after the weapons have been added to the soldier.
_soldier = _this select 0
; change the delay of the respawn here lige _delay = 30 if you dont want to specify it at script startup
_delay = _this select 1
; setting up all start values
_pos = getPos _soldier
_dir = getDir _soldier
_weapons = weapons _soldier
_magazines = magazines _soldier
;loops when alive
#alive
~3
? not alive _soldier : goto "notalive"
goto "alive"
#notalive
~_delay
removeAllWeapons _soldier
; resets soldiers position and direction as it was when the script was started
_soldier setPos _pos
_soldier setDir _dir
; adds all weapons and magazines that the unit had at the startup of the script
"_soldier addMagazine _x" forEach _magazines
"_soldier addWeapon _x" forEach _weapons
;and the magic respawn takes place
_soldier setDammage 0
_soldier selectWeapon primaryWeapon _soldier
goto "alive"
Hey I just created this script it respawns soldiers as the were when the script was initialized,
some credits goes to
doolittle because I got the basic idea from his vehicle respawn script
description.ext should be set to something like this
respawn = 3
respawndelay = 1000
(respawndelay should be higher then the respawn used in the script) so I just set it to 1000 in my missions,
and remember to put a game logic named Server in the game :-)
the init of the script is [Soldier,delay] exec "soldierRespawn.sps" in the init field after any weapons have been added to the soldier
tell me what you think
by the way at the moment its only player compatible, dont use it for AI respawning they dont shoot at you when they are respawned this way