Jump to content
Sign in to follow this  
{USI}_Zombie

Real Halo script

Recommended Posts

I am trying to modify    toadlife's excellent real_halo.xsqs and I almost have it, but now I am stuck.

 It works fine for the AI, but for the player it will never pull the chute, the action is displayed but will not deploy the chute, so that is where I need the assist...also I can't find the proper switchmove...here is the script:

Quote[/b] ];#Script by toadlife - (toadlife@toadlife.net)

_name = _this select 0

_height = _this select 1

_variance = _this select 2

_failrate = _this select 3

inhalo = []

_killem = false

?count _this < 4:goto "deploy"

#checklocal

@alive call compile format["%1",_name]

_unit = call compile format["%1",_name]

?local _unit:goto "autohalo"

~(2 + (random 2))

goto "checklocal"

#autohalo

@alive call compile format["%1",_name]

_unit = call compile 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 switchmove "para"

?_unit == player:haloaction = player addaction[localize "STR_REALHALO","realhalo.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 "autohalo"

_chute = "parachutewest" 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 = "parachutewest" 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]

exit

Share this post


Link to post
Share on other sites

Ok then, I fixed it myself.  The script needed some work and I had to do some modifications.  Here is an example mission showing the scripts.  I give credit to toadlife for the concept

real_halo.pbo

It's not really a mission per se, but you can see how the scripts work

Share this post


Link to post
Share on other sites

Hi {USI}_Zombie,

sorry i have no clue about scripting... sad_o.gif

But it's a really very funny script. smile_o.gif

Thank you for the Convertion!

Share this post


Link to post
Share on other sites

My pleasure.  Some of my squadmates have found the height sidechat annoying, but other than that it has recieved good reviews.  I just wish toadlife could see and and streamline the thing all back in to 1 script instead of the 2 that I was forced to revert to.  confused_o.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×