Jump to content
Sign in to follow this  
Bunny75

Satchel activating trigger

Recommended Posts

Is there a way to make trigger activated as you put a satchel charge on the ground? Not dropping it, but through the action menu; planting it.

Share this post


Link to post
Share on other sites

Fired eventhandler might be a better solution than a trigger.

this addEventHandler ["fired",{ 
if ((_this select 2) == "Pipebombmuzzle") then { _nil = [] execVM "playRunMusic.sqf" } 
}];

Edited by kylania

Share this post


Link to post
Share on other sites

EDIT: you beat me :)

I swear this place has the best support!

So that would be in the init.sqf like:

_expPlaced = player addEventHandler ["AnimDone", {exec "playRunMusic.sqf"}]

ok, so I found here:

http://forums.bistudio.com/showthread.php?t=80875&highlight=animation+list

these that might be it:

PutDown = "";

PutDownEnd = "";

and animDone should be done like this:

[unit, anim] > [player, PutDownEnd]

But how is this all combined? Like this:

_expPlaced = player addEventHandler ["AnimDone", {exec [player, PutDownEnd]"playRunMusic.sqf"}]

Share this post


Link to post
Share on other sites

Updated my example to include your script. Remember, SQF functions are run by the execVM command. :) exec is only used for SQS scripts of yore.

Share this post


Link to post
Share on other sites

Yes, you can do it in the init.sqf just like Kylania said:

player addEventHandler ["fired",{if ((_this select 2) == "Pipebombmuzzle") then { _nil = [] execVM "playRunMusic.sqf" } }];

_neo_

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  

×