OFPEC Forum

Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: Maximus-Sniper on 22 May 2005, 23:48:20

Title: Run two script when firing??
Post by: Maximus-Sniper on 22 May 2005, 23:48:20
Hi all :)

Well, now i'm working with my config file to my sniper pack :)
And i have a problem :( I like to run two script when i firing with my rifle. And i like to add this as:
Code: [Select]
class EventHandlers
      {
      fired = "if ((_this select 4) == ""AMMOM82APMag"" || (_this select 4) == ""AMMOM82ATMag"") then {_this call loadFile ""\myaddon\script\weaponFX\m82fx.sqf""};";
      };

As you all can see i have added a effect smoke/fire when i firing, and it's works. But the problem is, i like to add a tracer to  ??? I want to use WolfbaneÂ's tracerfx script, so it is possible to make a another file who included \myaddon\script\weaponFX\m82fx.sqf and \wbe_tracerfx\wbe_tracerfx.sqs  ?


Thanks :)
Title: Re: Run two script when firing??
Post by: Tyger on 22 May 2005, 23:54:00
I would believe so.

I would assume that you just include those files in the appropriate folders then add another event handler.
Title: Re: Run two script when firing??
Post by: Maximus-Sniper on 23 May 2005, 15:06:16
Hi :)

I got some help, and it's work now :) Here is how i did to run two script:

Code: [Select]
init="RAST_M82fx=loadFile ""\myaddon\script\weaponFX\m82fx.sqf""; [_This Select 0] Exec ""\wbe_tracerfx\wbe_tracerfx.sqs""";
fired="if ((_this select 4) in [""AMMOM82APMag"",""AMMOM82ATMag""]) then {_this call RAST_M82fx}";

Thanks :)