Welcome, Guest Wednesday 23rd April 2014, 19:11:46
   Home   Help Search Login Register  

OFPEC Forum

Author Topic: Dismount script [solved]  (Read 322 times)
0 Members and 1 Guest are viewing this topic.
zwobot
*
Offline Offline


« 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:
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 » Logged

"Executing tactics in real combat is the hardest thing one can ever do...well I've never given birth but..well whatever."
alimag
Contributing Member
**
Offline Offline


I'm a llama!


« 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
Logged
zwobot
*
Offline Offline


« 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.
Logged

"Executing tactics in real combat is the hardest thing one can ever do...well I've never given birth but..well whatever."
Rommel92
*
Offline Offline


« 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.
Logged

Pages: [1]   Go Up
  Send this topicPrint  
 
Jump to: