Home   Help Search Login Register  

Author Topic: Basic artillery trigger  (Read 2475 times)

0 Members and 1 Guest are viewing this topic.

Offline punisher

  • Members
  • *
Basic artillery trigger
« 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
The Gimp clan- pushing the limits of OFP
http://www.youtube.com/user/Pigdogmeat

Offline F2kSel

  • Members
  • *
Re: Basic artillery trigger
« Reply #1 on: 12 Jul 2011, 22:29:53 »
Did you get any errors?


It worked for me after I removed an extra quote from this line _round = ""SH_125_HE";

Code: [Select]
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;
« Last Edit: 12 Jul 2011, 22:46:24 by F2kSel »

Offline punisher

  • Members
  • *
Re: Basic artillery trigger
« Reply #2 on: 12 Jul 2011, 22:55:51 »
Ah cant beleive i didnt notice, thanks :)
And no i didnt get any errors
The Gimp clan- pushing the limits of OFP
http://www.youtube.com/user/Pigdogmeat

Offline Zipper5

  • BIS Team
  • ****
Re: Basic artillery trigger
« Reply #3 on: 12 Jul 2011, 23:14:32 »
Make sure you've got the -showScriptErrors parameter in your ARMA 2 shortcut.