OFPEC Forum
Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: punisher on 12 Jul 2011, 21:10:48
-
Hi
This may seem really obvious but im sorta an arma2 noob, im looking for a script that when a soldier walks into a continueous barrage begins.
I had tryed this:
if(!isServer) exitWith{};
private ["_trg", "_round", "_alpha", "_bravo", "_loc", "_delay"];
_trg = trgArty;
_round = ""SH_125_HE";
_alpha = ((triggerArea _trg) select 0);
_bravo = ((triggerArea _trg) select 1);
_loc = getPos _trg;
while {triggerActivated trgArty} do {
_round createVehicle [(_loc select 0) + _alpha - random (_alpha * 2),(_loc select 1) + _bravo - random (_bravo * 2), 600];
_delay = 13 - random 5;
sleep _delay;
};
sleep 1;
But for some reason no luck
-
Did you get any errors?
It worked for me after I removed an extra quote from this line _round = ""SH_125_HE";
if(!isServer) exitWith{};
private ["_trg", "_round", "_alpha", "_bravo", "_loc", "_delay"];
_trg = trgArty;
_round = "SH_125_HE";
_alpha = ((triggerArea _trg) select 0);
_bravo = ((triggerArea _trg) select 1);
_loc = getPos _trg;
while {triggerActivated trgArty} do {
_round createVehicle [(_loc select 0) + _alpha - random (_alpha * 2),(_loc select 1) + _bravo - random (_bravo * 2), 600];
_delay = 13 - random 5;
sleep _delay;
};
sleep 1;
-
Ah cant beleive i didnt notice, thanks :)
And no i didnt get any errors
-
Make sure you've got the -showScriptErrors parameter in your ARMA 2 shortcut.