Jump to content
Sign in to follow this  
major_winters

Dangle from chute

Recommended Posts

Hi, I want to create a soldier hanging dead from his parachute being about 3 metres off the ground.

I use the code:

this setpos [getpos this select 0, getpos this select 1, (getpos this select 2) +3]

..in the init field of the soldier, but the guy falls to the ground from 3 metres.  Is there anyway to display an open parachut above his head and stop him falling to the ground?

Thanks

Share this post


Link to post
Share on other sites

Hang.sqs

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

#start

_guy = _this select 0

#hang

_guy setpos [getpos _guy select 0, getpos _guy select 1, (getpos _guy select 2) +3]

~.01

?(missionendsthingiehere):exit

goto "hang"

The "?(missionendsthingiehere):exit" line. Just put a condition there that is activated with your end trigger.

For instance, at the end of the onactivation line if your using an end trigger, then put T1 = True, and the script line would be

?(T1):Exit

I'm not sure if you have to make the script exit with the mission, but people have told me that you have to  rock.gif

Share this post


Link to post
Share on other sites

Thanks Harnu, well, kinda worked, except he took off like he had an RPG up his backside!

I can only guess this because after every .01 seconds the guy gets put another 3 metres higher, so after a second hes gone up by 300 metres or so! wow_o.gif

Is there a way to disable gravity or am i gonna have to find the balance between his fall due to gravity and the script movin him up? Even then wouldnt it look like he was on a trampoline?!

Share this post


Link to post
Share on other sites

Doh! allow me to revise that script a second. Hate when the little things slip under ya.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#start

_guy = _this select 0

_thing = _this select 1

#hang

_guy setpos [getpos _thing select 0, getpos _thing select 1, (getpos _thing select 2) +3]

~.01

?(missionendsthingiehere):exit

goto "hang"

Put an invisible H at the Tree and name the invisible H

Name the man too obviously

To activate it, make a trigger like this, and place it over a person:

Anybody

Present

Condition:this

OnActivation: [Guyinparachiteorparachuteguyhere, nameofinvisibleH] exec "Hang.sqs"

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  

×