Jump to content
Sign in to follow this  
Cerberus094-PL-

Get out the boat and get in the truck, godammit

Recommended Posts

I have a big problem:

First I loaded three platoons on three boats. The boats are in one group.

That's the load script.

grp1 = units group najemnicy1
grp2 = units group najemnicy2
grp3 = units group najemnicy3


"_x assignAsCargo lodz1" forEach grp1
"_x moveInCargo lodz1" forEach grp1

"_x assignAsCargo lodz2" forEach grp2
"_x moveInCargo lodz2" forEach grp2

"_x assignAsCargo lodz3" forEach grp3
"_x moveInCargo lodz3" forEach grp3

Exit

Then the boats reach their "UNLOAD TRANSPORT" waypoint, the soldiers disembark automatically and now it starts to suck.

Now I want them to board trucks that were waiting for them (three trucks in one group, just like the boats). So i write another, "get-in" script:

;get in, bitches

"_x assignAsCargo guer_truck1" forEach grp1
"[_x] orderGetIn true" forEach grp1

"_x assignAsCargo guer_truck2" forEach grp2
"[_x] orderGetIn true" forEach grp2

"_x assignAsCargo guer_truck3" forEach grp3
"[_x] orderGetIn true" forEach grp3

But they totally ignore it. Something has been done wrong at the beginning? Is it even possible to force unit to enter next vehicle?

Please help me, I'm really getting mad with it. If you know any other, simplier solution to get this effect - get out of the boats and board the trucks - also post here.

Share this post


Link to post
Share on other sites

hi,

I think your solution should work you just forgot unassignVehicle command. It means that your group is still assigned to the boat and refuses to get in the truck. You should also rewrite your script to have a cleaner code something like this:

Load group in boat.

load_veh.sqs

;*****************************************
;Vehicle Load Script by Nikiller v0.9b
;Load a group in a vehicle
;contact: nikillerofp@hotmail.fr
;[groupName,vehicleName] exec load_veh.sqs
;*****************************************

_grp = _this select 0
_veh = _this select 1

_units=Units _grp

;not sure assignAsCargo command is really needed here, anyway it doesn't hurt to use it
{_x assignAsCargo _veh} forEach _units
{_x moveInCargo _veh} forEach _units

exit

The next script will unattach the group from the boat.

unassign_veh.sqs

;*****************************************
;Unassign Vehicle Script by Nikiller v0.9b
;Unassign a group in a vehicle
;contact: nikillerofp@hotmail.fr
;[groupName] exec unassign_veh.sqs
;*****************************************

_grp = _this select 0

_units=Units _grp

{unassignVehicle _x} forEach _units

exit

And now the get in script.

getin_veh.sqs

;*****************************************
;Get In Vehicle Script by Nikiller v0.9b
;Make a get in group in a vehicle
;contact: nikillerofp@hotmail.fr
;[groupName,vehicleName] exec getin_veh.sqs
;*****************************************

_grp = _this select 0
_veh = _this select 1

_units=Units _grp

{_x assignAsCargo _veh} forEach _units
{[_x] orderGetIn true} forEach _units

exit

Sorry but I haven't the time to make a demo. Say me if it works. If not I'll try to have a look in the editor.

cya.

Nikiller.

Edited by Nikiller

Share this post


Link to post
Share on other sites

Hi, is this script will instantly make the soldier groups inside the chopper. So lets say my UH is set in Flying in editor and when i Preview it the soldiers are already inside the helicopter

Share this post


Link to post
Share on other sites
Hi, is this script will instantly make the soldier groups inside the chopper. So lets say my UH is set in Flying in editor and when i Preview it the soldiers are already inside the helicopter

And ?

Share this post


Link to post
Share on other sites
Hi, is this script will instantly make the soldier groups inside the chopper. So lets say my UH is set in Flying in editor and when i Preview it the soldiers are already inside the helicopter

If you don't wan't the units to start inside the vehicle but board it at the beginning of the script, use the "getin_veh.sqs" Nikiller posted. "moveinCargo", "moveinDriver" etc immediately teleport the unit inside the vehicle, regardless of their position (and are, AFAIK, automatically assigned to that vehicle)

Share this post


Link to post
Share on other sites

OK, now it works! :yay:

I had to change the "TRANSPORT UNLOAD" waypoint on "MOVE", that was the key to solve the problem.

Share this post


Link to post
Share on other sites

hi,

;1923045']OK' date=' now it works! :yay:

I had to change the "TRANSPORT UNLOAD" waypoint on "MOVE", that was the key to solve the problem.[/quote']

Very good glad it works ;)

cya.

Nikiller.

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  

×