OFPEC Forum
Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: stoptheclocks24 on 09 May 2011, 15:29:08
-
Hey guys.
I used to tinker with the Operation Flashpoint editor years a go and thought i'd give ArmA2 a try! Problem is most of my editing skills have cobwebs on! Anyway, i'm looking for a script that when activated by a trigger will 'eject' players from the chopper or plane every second or so. I believe back in the day of OFP a guy called the[]coyote made a script that did the job, but I don't have OFP or a means of editing compiled missions. :P
Thanks.
-
Hey there, and welcome back to the wonderful world of editing :D
This is a real simple script to make, so I'll just write it up for you here. Save it as e.g. paradrop.sqf, and use [group, delay] execVM "paradrop.sqf" to execute it. This is in .sqf, rather than OFP-era .sqs, so there are some syntax differences, but don't be afraid ;) it all works the same.
_group = _this select 0;
_delay = _this select 1;
for "_i" from 0 to ((count units _group) - 1) do
{
_curJumper = (units _group) select _i;
_curJumper action ["eject", (vehicle _curJumper)];
sleep _delay;
};
// Script end
Delay is the delay in seconds between jumps, and the group is of course the name of the group doing the jumping. That's all you should need :)
Wolfrug out.
-
Hey.
Thanks for the reply mate and it indeed feels good to be back! I suspected it'd be a 'for' statement but I just wasn't sure about the language or its syntax. :P So i'm right in thinking .sqs isn't used any more and .sqf is?
Also, is there a program about that can 'decompile compiled missions' to see how they look in the editor? I remember there being one in OFP. Would be handy getting to know the game.
Thanks!
-
Yes there is a pbo decryptor from armaholic I have used before. It works well. It says it's for armed assault, but you can use it for ArmrA II.
http://www.armaholic.com/page.php?id=1434
I hope this helps.
Cheers