Jump to content
Sign in to follow this  
ClarkeJ

I'm looking for an Artillery script that fires when activated by a trigger...

Recommended Posts

Hey all,

I'm once again making a mission and in this one, 50 players will be defending a large FOB against a Russian AI attack. What I want to happen is when the BLUFOR enters a trigger around the FOB, an artillery/rocket strike will commence and start landing around the FOB. I only want it to last for 45 seconds to a minute and once it has finished, the Russian's will attack with ground forces. Thank you to any help in advance, I appreciate it.

Thanks,

Jake

Share this post


Link to post
Share on other sites

Set the trigger to touch off when BLUFOR enters it, this can be done in editor, it's a simple thing, you don't need a script for that. What you need a script for is fireing the artillery.

Put in the "on act." field something like this:

_trigger = 1;
_x = 1;
while {_trigger == 1} do
{
 if (_x == 1) then
 {
   artUnit doTarget yourArtTarget;
   sleep 5;
 }
 artUnit doFire yourArtTarget;
 _x =+ 1;
 sleep 1;
 if (_x==45) then {_trigger = 0};
}

But this script will work only in theory, because I am not sure if the artillery will be able to shoot fast enough to avoid the sleep command from stopping it. Try it, maybe it will work.

Share this post


Link to post
Share on other sites

Gentlemen,

Thank you both for your help. Mr Twirly, that mission worked great and now I can finally progress with my mission!

Thanks,

Jake

---------- Post added at 11:30 ---------- Previous post was at 09:49 ----------

Just another quick question. I managed to get this to work but I can only get one type of round to be fired. I'd like a mixture of Smoke and HE, is there to decide what type of round the Artillery piece fires?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×