easydays 0 Posted February 23, 2003 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 car1chute1b = this select 0car1 = this select 1endcargosession = falsegoto debug#herex = (getpos chute1b ) select 0y = (getpos chute1b ) select 1z = (getpos chute1b ) select 2car1 setpos [ x , y , z]car1 setdir (getdir chute1b)goto "here"exit Share this post Link to post Share on other sites
Animal_Mother -SWAF- 0 Posted February 23, 2003 goto debug??? Share this post Link to post Share on other sites
Bart.Jan 0 Posted February 23, 2003 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
InqWiper 0 Posted February 23, 2003 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