Home   Help Search Login Register  

Author Topic: Trouble with units in cargo  (Read 3235 times)

0 Members and 1 Guest are viewing this topic.

Offline Rommel92

  • Members
  • *
Re: Trouble with units in cargo
« Reply #15 on: 01 Jun 2008, 04:07:06 »
Did anything come up on screen? No values to tell us...  :dunno:
Delete that line then tell us what it returns then, and if possible could you show how your executing the script!

Thanks, Romm.

Code: [Select]
_groups = _this select 0;
_vehicles = _this select 1;
for [{_i = 0},{_i < count _groups},{_i=_i + 1}] do
{
   [_groups select _i, _vehicles select _i] spawn
   {
      _grp = _this select 0;
      _veh = _this select 1;
      _nunits = count units _grp;
      for [{_j = 0},{_j < _nunits},{_j = _j + 1}] do
      {
      player globalchat format["_unit: %1 --- _grp: %2 --- _veh: %3 --- emptyPos _veh: %4",_unit,_grp,_veh,_veh emptyPositions "cargo"];
         _unit = units _grp select _j;
         _unit assignAsCargo _veh;
         [_unit] orderGetIn true;
         Sleep 1;
      };
   };
}:

Offline schuler

  • Contributing Member
  • **
Re: Trouble with units in cargo
« Reply #16 on: 01 Jun 2008, 04:24:48 »
Quote
My knowledge of sqf/scripting in general is not very good
same here but are sure it should be sqf?  :dunno:
@ Rommel Victoria rules dude,,,,,,,, notice i said dude not mate  :P
@ trooper keep up the good work ,,,,,,  ;)
i think Cheetah had a sqf tute, i looked but didnt find it  :weeping:
Semper Fi

Offline trooper543

  • Members
  • *
Re: Trouble with units in cargo
« Reply #17 on: 02 Jun 2008, 08:59:49 »
eish no i am totallty lost   ::)

Still get an error i honestly dont know what i am doing here


Offline schuler

  • Contributing Member
  • **
Re: Trouble with units in cargo
« Reply #18 on: 02 Jun 2008, 14:47:14 »
i think!?!?!?!? you can add the sqf with the cutscene sqs and more scripts too sqs, inserted at the right time
sorry i might be wrong with what your doing ,,,,
but best to solve all the troops boarding first;)one thing at a time

Quote
eish no i am totallty lost   Roll Eyes

Still get an error i honestly dont know what i am doing here

 
Semper Fi

Offline Rommel92

  • Members
  • *
Re: Trouble with units in cargo
« Reply #19 on: 02 Jun 2008, 21:12:53 »
Ok mate, step by step.
Go into the editor or wherever you have "executed" this script from, in other words, where you put:
Code: [Select]
[[grp1,grp2,grp3],[plane1,plane2,plane3]]execVM"board.sqf"; and what were the parameters (were they grp1, grp2, grp3, or were they bravoGRP1 etc, what did you put in the brackets).

Second step.
Code: [Select]
_groups = _this select 0;
_vehicles = _this select 1;
for [{_i = 0},{_i < count _groups},{_i=_i + 1}] do
{
   [_groups select _i, _vehicles select _i] spawn
   {
      _grp = _this select 0;
      _veh = _this select 1;
      _nunits = count units _grp;
      for [{_j = 0},{_j < _nunits},{_j = _j + 1}] do
      {
      player globalchat format["_unit: %1 --- _grp: %2 --- _veh: %3 --- emptyPos _veh: %4",_unit,_grp,_veh,_veh emptyPositions "cargo"];
         _unit = units _grp select _j;
         _unit assignAsCargo _veh;
         [_unit] orderGetIn true;
         Sleep 1;
      };
   };
}:
Backup the original script (the one posted originally) and replace it with the one above. Play the mission and it should come up with a bunch of text, when that comes up, thats this line of code:
Code: [Select]
player globalchat format["_unit: %1 --- _grp: %2 --- _veh: %3 --- emptyPos _veh: %4",_unit,_grp,_veh,_veh emptyPositions "cargo"];This code make the player, speak over globalchat expressing the variables (values) of: _unit, _grp, _veh and how many emptyPositions in _veh 's cargo.

This data can help us come to a conclusion (if provided) as to what the problem may be...

Hope this helps mate.  :yes:

Offline trooper543

  • Members
  • *
Re: Trouble with units in cargo
« Reply #20 on: 06 Jun 2008, 02:13:10 »
Thanks Rommel

I will try out your solution and come back to you with the results
many thanks agains