Jump to content
Sign in to follow this  
Rexxenexx

Need help w/ script for boarding jeeps

Recommended Posts

I made this for an eight player squad to count units in the group then the first and fifth alive players are the Drivers and the rest are Cargo. I want to just use it whenever the squad is done with a scene they board the jeeps([]exec getin.sqs). Now when I use it at the start of the mission it works fine, but later when I use it OFP just skips it and goes to the next waypoint. It doesn't seem to activate the orderGetin, and when I use a getin waypoint it doesn't recount the players in the group to assign a proper driver. So if the driver dies their will be no driver. Here's the script I made:

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

_units = units mygrp

_unitcount = count _units

_counter = 0

_whichjeep = jeep1

#KEEPSENDING

?_counter == 0:goto "DRIVER1"

?_counter == 4:goto "DRIVER2"

myunits select _counter AssignAsCargo _whichjeep

_counter=_counter+1

?_unitcount >_counter:goto "KEEPSENDING"

goto "END"

#DRIVER1

myunits select _counter AssignAsDriver _whichjeep

_counter=_counter+1

goto "KEEPSENDING"

#DRIVER2

_whichjeep = jeep2

myunits select _counter AssignAsDriver _whichjeep

_counter=_counter+1

goto "KEEPSENDING"

#END

myunits OrderGetIn true

exit<span id='postcolor'>

What do you guys suggest?

TIA

Share this post


Link to post
Share on other sites

I can't see anything wrong with the script, but:

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

I guess this was just a typing error. Try switching AssignAsCargo to moveincargo to see if that works.

RED

Share this post


Link to post
Share on other sites

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Quote (RED @ Oct. 12 2002,09:20)</td></tr><tr><td id="QUOTE">Try switching AssignAsCargo to moveincargo to see if that works.

RED<span id='postcolor'>

Yea it works with the moveincargo. All I need to do is make a getin waypoint and they properly getin. So I guess it has something to do with assigningascargo they get fixed into cargo pos. I tried adding:

unassignVehicle s1

unassignVehicle s2

unassignVehicle s3

unassignVehicle s4

unassignVehicle s5

unassignVehicle s6

unassignVehicle s7

unassignVehicle s8

at the top of the script, and then calling the script at every waypoint I want them to getin. But that didn't work, they just walked to the next waypoint ignoring the script.

anyone else got a tip??

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  

×