Jump to content
Sign in to follow this  
undercoverbrother

Problem with script for trigger activated IED (FOR BEGINNER)

Recommended Posts

Hi all,

I've been experimenting with the OA mission editor and using a video tutorial from BI themselves, tried to create a mission with a trigger activated IED. Because I don't now how to put images in posts I'll describe whats in the mission (its pretty simple anyway). Theres a AI controlled vehicle that follows a waypoint through a triggerzone activating it. On activation this script executes:

_shellArray =

[

'Bo_GBU12_lgb'

]

which is placed in a text file (which I changed to sqf just like the tutorial said) in the according folder in the arma 2 oa missions file in my documents. The sqf file I created is called "IED.sqf" (just like the tutorial said).

I have also added this:

_nil = [] execVM "IED.sqf"

into the activation field of the triggerzone (just like the tutorial said - ok I'll stop). And... nothing...

The vehicle goes through the trigger and absolutley nothing happens, I've tried everything. Please I really need a hand with this.

Cheers,

Share this post


Link to post
Share on other sites

You missed the rest of that script. What you've done there is just listed one possible bomb.

Here's the full script from the example mission BIS made:

// An Array of ammunition from which to choose
_shellArray =
[
"B_30mm_HE",
"ARTY_Sh_81_HE",
"ARTY_Sh_120_HE"
// "Bo_GBU12_LGB" // Massive Explosion - use at your own risk ;)
];

// Select random explosion type:
_shell = _shellArray call BIS_fnc_selectRandom;

// Spawn the explosion
_explosion = _shell createVehicle position IED;

If you want the really big explosion to be a possiblity, remove the two // before the "Bo_GBU12..." part. Also remember to place the Functions Module (F7) on the map.

Share this post


Link to post
Share on other sites

thanks for going to all the trouble mate. BIS left those last few lines at the bottom out of the video, probably why my mission wasn't working.

Share this post


Link to post
Share on other sites

I am tinkering around with the editor a bit, starting off with the tutorials provided by BIS.

I coped their BykerGrove2 script from the video, and later directly from the IED.sqf provided with their tutorial mission.

I made a slight change to the array to have a few other options.

My current IED.sqf file is:

// an array of ammunition for the IED
_shellArray =
[
"B_30mm_HE",
"Sh_125_HE",
"Bo_Mk82",
"ARTY_Sh_105_HE",
"ARTY_R_120mm_HE_Rocket"
];
// Select random explosion type:
_shell = _shellArray call BIS_fnc_selectRandom;

// Spawn the explosion
_explosion = _shell createVehicle position IED;

I have a Trigger set to On Activation for the following

_nil = [] execVM "IED.sqf"

There is also an object placed named IED (a pile of trash, just like in the tutorial). Finally, I added the Module - Functions to the mission just to be sure that the bis_func_selectRandom was available.

All of this is a direct copy again from the tutorial. The Trigger executes the IED.sqf, which picks an explosion from the array and detonates it at the location of object IED.

...

Nothing explodes.

Just for giggles, I ran the BykerGrove2 tutorial mission and EVERY TIME that I drive by the trash, a small bit of smoke comes out of it but no explosion. What is going on here?

Edited by noonesshowmonkey

Share this post


Link to post
Share on other sites

HI can someone give me an update on this same thing is happening to me.

The vehicle goes through the trigger but nothing happens.

noonesshowmonkey did u ever fix this little problem

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  

×