Jump to content
Sign in to follow this  
redarmy

remove smoke grenade from all sides

Recommended Posts

Guys i had a script a while ago saved,found it SOMEWHERE on forums.

To remove smoke grenades from all sides on map.

I cannot find that post anymore its buried deep.

Does anyone know a script line for all sides to remove smoke grenades from mission?

Share this post


Link to post
Share on other sites
Guys i had a script a while ago saved,found it SOMEWHERE on forums.

To remove smoke grenades from all sides on map.

I cannot find that post anymore its buried deep.

Does anyone know a script line for all sides to remove smoke grenades from mission?

Do you want to learn how to do it, and be tutored so you can improve your scripting skill, or do you just want someone to post the damn script and be done?

Share this post


Link to post
Share on other sites

I would like to learn actually,though i do not plan ever on getting deep into scripting.I usually need simplistic scripts,yet simplistic scripts is still hard to understand for me.The majority of the arma community when explaining how scripts work,think we understand their every word,when really,its like trying to read chinese.

So yes,if i had alot of time to learn scripting,it would be great,as it is i would just like someone to direct me to what i need to do for the effect im looking for.

Share this post


Link to post
Share on other sites
Guys i had a script a while ago saved,found it SOMEWHERE on forums.

To remove smoke grenades from all sides on map.

I cannot find that post anymore its buried deep.

Does anyone know a script line for all sides to remove smoke grenades from mission?

Like this one?

Guess who started that thread :)

Share this post


Link to post
Share on other sites
Like this one?

Guess who started that thread :)

If that worked,i wouldnt have started this thread,would i?

Share this post


Link to post
Share on other sites

If that didn't worked, you could bump the old thread instead of making a new one, could you?

The answer in that thread is half valid, and not very performantic. The main problem is your calling method, and nobody answered you.

First, don't do that in a trigger. You must build a script to do that. I assume you know how to do it (if not, we are starting from scratch and first you should read one tutorial of the existing around).

Instead of an eternal loop checking for magazines in each unit, it's easier to incroporate this code with some tweaks to the script you are using to spawn the units.

So if you have _unit = createUnit blablabla, after that, you can: _nul = [_unit] execVM "removesmoke.sqf";

If you are spawning units with BIS_fnc_spawnGroup, then, you must use it this way: {_nul = [_x] execVM "removesmoke.sqf";} forEach units groupname;

And the mentioned script:

_unit = _this select 0;

_mags = magazines _unit;

{if ((_x == "smokeShell") or (_x == "smokeShellRed") or (_x == "whatevertype of ammo you want to remove")) then

{

_unit removeMagazines _x;

};

} forEach _mags;

should work (not tested, I'm in the office)

Share this post


Link to post
Share on other sites
If that didn't worked, you could bump the old thread instead of making a new one, could you?

The answer in that thread is half valid, and not very performantic. The main problem is your calling method, and nobody answered you.

First, don't do that in a trigger. You must build a script to do that. I assume you know how to do it (if not, we are starting from scratch and first you should read one tutorial of the existing around).

Instead of an eternal loop checking for magazines in each unit, it's easier to incroporate this code with some tweaks to the script you are using to spawn the units.

So if you have _unit = createUnit blablabla, after that, you can: _nul = [_unit] execVM "removesmoke.sqf";

If you are spawning units with BIS_fnc_spawnGroup, then, you must use it this way: {_nul = [_x] execVM "removesmoke.sqf";} forEach units groupname;

And the mentioned script:

_unit = _this select 0;

_mags = magazines _unit;

{if ((_x == "smokeShell") or (_x == "smokeShellRed") or (_x == "whatevertype of ammo you want to remove")) then

{

_unit removeMagazines _x;

};

} forEach _mags;

should work (not tested, I'm in the office)

Thanks for the explanation barbolani.

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  

×