Jump to content
Sign in to follow this  
ltartorious

AssignAsCargo Help!

Recommended Posts

Hello!

I have a problem with my code at the current time.

My Problem is that, as you can see at the bottom, I am using the assignAsCargo command, follow by the OrderGetIn true, and it doesn't work, when the units spawn in they just stand there and don't get in the vehicle.

I have also tried using the MoveInCargo Command, but to no avail.

Could any of the scripting wizards give me a hand?

(This is my first time asking for help, so please let me know if I'm being too vague about something, or if theres something you want to know).

Hint "heeeyoo";

_SafePos = [getMarkerPos "Discovered_Spawn", 10, 50, 10, 0, 100, 0] call BIS_fnc_findSafePos;

_SafePos1 = [getMarkerPos "Discovered_Spawn", 10, 50, 10, 0, 100, 0] call BIS_fnc_findSafePos;

_SafePos2 = [getMarkerPos "Discovered_Spawn", 10, 50, 10, 0, 100, 0] call BIS_fnc_findSafePos;

_SafePos3 = [getMarkerPos "Discovered_Spawn", 10, 50, 10, 0, 100, 0] call BIS_fnc_findSafePos;

//Defining the different patrols

_10mangrp = ["rhs_msv_emr_sergeant", "rhs_msv_emr_junior_sergeant", "rhs_msv_emr_grenadier", "rhs_msv_emr_rifleman", "rhs_msv_emr_machinegunner", "rhs_msv_emr_at", "rhs_msv_emr_strelok_rpg_assist", "rhs_msv_emr_rifleman", "rhs_msv_emr_rifleman", "rhs_msv_emr_medic"];

_8mangrp = ["rhs_msv_emr_sergeant", "rhs_msv_emr_junior_sergeant", "rhs_msv_emr_grenadier", "rhs_msv_emr_rifleman", "rhs_msv_emr_machinegunner", "rhs_msv_emr_at", "rhs_msv_emr_rifleman", "rhs_msv_emr_medic"];

_6mangrp = ["rhs_msv_emr_sergeant", "rhs_msv_emr_grenadier", "rhs_msv_emr_rifleman", "rhs_msv_emr_machinegunner", "rhs_msv_emr_at", "rhs_msv_emr_medic"];

_4mangrp = ["rhs_msv_emr_sergeant", "rhs_msv_emr_grenadier", "rhs_msv_emr_rifleman", "rhs_msv_emr_rifleman"];

_2mangrp = ["rhs_msv_emr_grenadier", "rhs_msv_emr_rifleman"];

_2mansnipergrp = ["rhs_msv_emr_grenadier", "rhs_msv_emr_marksman"];

_vehiclepatrol = ["rhs_btr70_msv"];

_TransportTruck = ["RHS_Ural_MSV_01"];

//Defining random positions for patrols

_RandomPos = createVehicle ["land_helipadempty_F", getMarkerPos "Discovered_Spawn", [], 0, "CAN_COLLIDE"];

_RandomPos1 = [_RandomPos, random 30, random 360]call bis_fnc_relpos;

_RandomPos2 = [_RandomPos, random 30, random 360]call bis_fnc_relpos;

_RandomPos3 = [_RandomPos, random 30, random 360]call bis_fnc_relpos;

_RandomPos4 = [_RandomPos, random 30, random 360]call bis_fnc_relpos;

_RandomPos5 = [_RandomPos, random 30, random 360]call bis_fnc_relpos;

_RandomPos6 = [_RandomPos, random 30, random 360]call bis_fnc_relpos;

_RandomPos7 = [_RandomPos, random 30, random 360]call bis_fnc_relpos;

//Patrols

_patrol1 = [_RandomPos1, EAST, _8mangrp,[],[],[],[],[],0] call BIS_fnc_spawnGroup;

_patrol2 = [_RandomPos2, EAST, _6mangrp,[],[],[],[],[],0] call BIS_fnc_spawnGroup;

_patrol3 = [_RandomPos3, EAST, _6mangrp,[],[],[],[],[],0] call BIS_fnc_spawnGroup;

_patrol4 = [_RandomPos4, EAST, _2mansnipergrp,[],[],[],[],[],0] call BIS_fnc_spawnGroup;

_patrol5 = [_RandomPos5, EAST, _4mangrp,[],[],[],[],[],0] call BIS_fnc_spawnGroup;

_patrol6 = [_RandomPos6, EAST, _4mangrp,[],[],[],[],[],0] call BIS_fnc_spawnGroup;

_patrol7 = [_SafePos, EAST, _vehiclepatrol,[],[],[],[],[],0] call BIS_fnc_spawnGroup;

_patrol8 = [_SafePos1, EAST, _TransportTruck,[],[],[],[],[],0] call BIS_fnc_spawnGroup;

_patrol9 = [_SafePos2, EAST, _TransportTruck,[],[],[],[],[],0] call BIS_fnc_spawnGroup;

_patrol10 = [_SafePos3, EAST, _TransportTruck,[],[],[],[],[],0] call BIS_fnc_spawnGroup;

sleep 5;

{_x AssignAsCargo _Patrol8} forEach Units _Patrol2;

{[_x] orderGetIn true} forEach Units _Patrol2;

Edited by LtArtorious

Share this post


Link to post
Share on other sites

Because your trying to assign a group as cargo to a group, not a vehicle.

Share this post


Link to post
Share on other sites

ohh, I see, How would I go about changing the group to a vehicle?

Would it be BIS_fnc_spawnVehicle, instead of BIS_fnc_spawnGroup?

(Just so you know I'm off to bed but will be back in the morning)

Edited by LtArtorious

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  

×