Jump to content
Sign in to follow this  
easydays

Airdrop.sqs hmmve dissapiers when it touches

Recommended Posts

am setpos a hmnvee 100m in air the camcreate a parachute and then script it to be carry by the parachute

two problems  i get  car1 variable already reserved

and when hmnvee hits gound it vanished

hmnvee name is  car1

parachute is name chute1b

hmnvee is a empty vehicle

also am trigering the script from the addaction menu put to my soldier

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

chute1b = "parachutec" camcreate getpos car1

chute1b = this select 0

car1 = this select 1

endcargosession = false

goto debug

#here

x = (getpos chute1b ) select 0

y = (getpos chute1b ) select 1

z = (getpos chute1b ) select 2

car1 setpos [ x , y , z]

car1 setdir (getdir chute1b)

goto "here"

exit

Share this post


Link to post
Share on other sites

You can not use

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">car1 = this select 1<span id='postcolor'>

because you have some unit named car1 (reserved variable problem)

Next you have inifinite loop

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

#here

...

goto "here"<span id='postcolor'>

(maybe it's reason why car disappears. When chute hit the ground it disappears and because car1 has always position of chute it disappears too)

Next I don't think

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">car1 setpos [getpos this select 0,getpos this select 1,(getpos this select 2)+100]<span id='postcolor'>

inside script moves car 100 meter high. Instead of this use car1.

Share this post


Link to post
Share on other sites

Try adding this line:

?(getpos car1 select 2)>0.1:goto "here"

==================================

#here

x = (getpos chute1b ) select 0

y = (getpos chute1b ) select 1

z = (getpos chute1b ) select 2

car1 setpos [ x , y , z]

car1 setdir (getdir chute1b)

?(getpos car1 select 2)>0.1:goto "here"

exit

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  

×