Jump to content

scottb613

Delete ModuleEffectsFire_F (C3_Fire)?

Recommended Posts

Hi Folks,


Quick Question - "deleteVehicle" doesn't seem to work with fire and smoke modules - such as "ModuleEffectsFire_F (C3_Fire)".

 

Can I delete this via script?

 

Thanks.


Creating a mission with random crash sites:

  Reveal hidden contents


Scott

Share this post


Link to post
Share on other sites

Hi Folks,

 

Not a solution - but - a work around.

 

Added a Particle Effect as opposed to having to delete a Module:

  Reveal hidden contents

 

 

Regards,
Scott

Share this post


Link to post
Share on other sites
  On 7/28/2024 at 6:53 PM, scottb613 said:

Quick Question - "deleteVehicle" doesn't seem to work with fire and smoke modules - such as "ModuleEffectsFire_F (C3_Fire)".

Can I delete this via script?

 

 

Yes, name your fire module (class ModuleEffectsFire_F), say module1  (or use magic variable like _x in same scope) , then, when you don't want effects anymore:

deleteVehicle ((module1 getVariable "effectEmitter") select 0);
deleteVehicle ((module1 getVariable "effectLight") select 0);

For smoke module (ModuleEffectsSmoke_F), the first line (effectEmitter) is enough.

 

 

Btw, another way for scripting your goal:

 

private _crashArr1 = [C1_Wreck, C1_Body1, C1_Body2, C1_Body3];
private _crashArr2 = [C2_Wreck, C2_Body1, C2_Body2, C2_Body3];
private _crashArr3 = [C3_Wreck, C3_Body1, C3_Body2, C3_Body3];
private _crashArr4 = [C4_Wreck, C4_Body1, C4_Body2, C4_Body3];
private _allCrashes = [_crashArr1,_crashArr2,_crashArr3,_crashArr4];
private _activeCrash =  _allCrashes deleteAt floor random 4;
{deleteVehicle _x} forEach flatten _allCrashes;

 

What else?

  • Like 1

Share this post


Link to post
Share on other sites

Hi Pierre,

 

I drift in and out around here - but - always nice to see you posting.

 

Thanks for your help and I always appreciate seeing how I could code it better.

 

Time to look up a couple new commands I haven't used before.

😉

 

Regards,

Scott

  • Thanks 1

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

×