Home   Help Search Login Register  

Author Topic: problem with real_halo.xsqs  (Read 484 times)

0 Members and 1 Guest are viewing this topic.

Offline Zombie

  • Members
  • *
  • Beware the night, the zombie walks among you
    • USI
problem with real_halo.xsqs
« on: 27 Feb 2005, 18:12:30 »
when using toadlifes real_halo.xsqs I am having a respawn problem.  I am trying to use group respawn, and if a player pulls too late and dies, he won't respawn.  The screen just switches to a camera view and looks at water.  I have tried respawn delays from 1 to 30 with the same results.  I am using this with wargames mod.
script:
Code: [Select]
;#Script by toadlife - (toadlife@toadlife.net)
;;requiredversion "1.85"
_name = _this select 0
_height = _this select 1
_variance = _this select 2
_failrate = _this select 3
inhalo = []
_killem = false
enableradio false


?count _this < 4:goto "deploy"

#checklocal
@alive call format["%1",_name]
_unit = call format["%1",_name]
?local _unit:goto "autohalo"
~(2 + (random 2))
goto "checklocal"

#autohalo
@alive call format["%1",_name]
_unit = call format["%1",_name]
~1
@!alive _unit || "ParachuteBase" counttype [vehicle _unit] > 0
?!alive _unit:goto "checklocal"
?(getpos vehicle _unit select 2 < 100):goto "autohalo"
?player in inhalo:goto "autohalo"
_chute = vehicle _unit
_unit action["eject",_chute]
@!(vehicle _unit == _chute)
_chute setpos [0,0,0]
deletevehicle _chute
_unit setbehaviour "safe"
?_unit == player:haloaction = player addaction["Deploy Chute","real_halo.xsqs"];goto "checklocal"
_var = (random _variance) - (random _variance)
_openheight = _height + _var
@getpos _unit select 2 <= _openheight
_rand1 = random _failrate
_rand1 = _rand1 - (_rand1 mod 1)
_rand2 = random _failrate
_rand2 = _rand2 - (_rand2 mod 1)
?_rand1 == _rand2:_unit switchmove "";_unit sidechat "F***! My chute won't open!";goto goto "autohalo"
_chute = "parachute" createvehicle getpos _unit
_chute setpos getpos _unit
_vel = velocity _unit
_unit assignasdriver _chute
_unit moveindriver _chute
_chute setvelocity _vel
@((getpos _unit select 2) <= 10) || !(alive _unit)
?velocity vehicle _unit select 2 <= -15:_killem=true
@((getpos _unit select 2) <= 1) || !(alive _unit)
?_killem && alive _unit:_unit setdammage 1;deletevehicle _chute;_unit switchmove "combattodying"
_killem=false
goto "autohalo"


#deploy
inhalo = inhalo + [player]
~0.5
player removeaction haloaction
_rand1 = random _failrate
_rand1 = _rand1 - (_rand1 mod 1)
_rand2 = random _failrate
_rand2 = _rand2 - (_rand2 mod 1)
?_rand1 == _rand2:exit
_chute = "parachute" createvehicle getpos player
_chute setpos getpos player
_vel = velocity player
player assignasdriver _chute
player moveindriver _chute
_chute setvelocity _vel
@((getpos player select 2) <= 10) || !(alive player)
?velocity vehicle player select 2 <= -15:_killem=true
@((getpos player select 2) <= 1) || !(alive player)
?_killem && alive player:player setdammage 1;deletevehicle _chute;player switchmove "combattodying"
_killem=false
inhalo = inhalo - [player]
enableradio true
exit