Home   Help Search Login Register  

Author Topic: Dismount script [solved]  (Read 1507 times)

0 Members and 1 Guest are viewing this topic.

Offline zwobot

  • Members
  • *
Dismount script [solved]
« on: 23 Nov 2009, 00:12:33 »
Hello,
I want to make a mechanised infantry squad dismount their transport (in the same group) at a SCRIPTED waypoint. Therefor I have the following script:
Code: [Select]
private["_group", "_i", "_vehicle"];

_group = _this select 0;

_units = units _group;
_vehicle = vehicle leader _group;

_group setFormation "VEE";
_group setSpeedMode "LIMITED";

{
if( (_x != gunner _vehicle) && (_x != driver _vehicle) && (_x != commander _vehicle)) then {
_x action["eject", _vehicle];
unassignVehicle _x;
[_x] allowGetIn false;
};
} foreach _units;

So basically everyone who is not crew in the vehicle should dismount but the script does not work and I have no idea why. I have ported the script from Ofp where it works perfectly.
Can you help me please?
« Last Edit: 28 Nov 2009, 14:27:12 by zwobot »
"Executing tactics in real combat is the hardest thing one can ever do...well I've never given birth but..well whatever."

Offline alimag

  • Contributing Member
  • **
  • I'm a llama!
Re: Dismount script
« Reply #1 on: 26 Nov 2009, 19:58:12 »
Hi,

Theorically, it should work if called correctly.

In Arma 2 this should be an SQF script and should be called with the execVM command.

Is this the way the scripted waypoint is calling it?

Cheers

Offline zwobot

  • Members
  • *
Re: Dismount script
« Reply #2 on: 28 Nov 2009, 14:26:56 »
Thanks for the response alimag. I found out that Arma2 only executes sqs with SCIPTED waypoints. When you enter a sqf script in the "Script" line of the waypoint control structures (for- loops, if selections etc.) aren't executed properly.
"Executing tactics in real combat is the hardest thing one can ever do...well I've never given birth but..well whatever."

Offline Rommel92

  • Members
  • *
Re: Dismount script [solved]
« Reply #3 on: 05 Dec 2009, 09:00:33 »
You could try the execvm in the script your executing... if it means that much to you.