Jump to content
Sign in to follow this  
jubbie

A special kind of weapon...

Recommended Posts

Hi guys

I'm trying to make a weapon that's like a geiger counter. You carry it in your hands like a pistol and it has optics and when you fire it, it activates a "fired" event handler.

My problem is that everytime I fire the weapon, I get a puff of smoke. This looks stupid on a geiger counter. I can get rid of the smoke if I don't assign a muzzle position to the model (in the model itself or in the config) but then I can't use the optics, which is kind of important.

I tried using the "useAction" command, but you can't insert a script in there, thus I must fire the weapon (even though it doesn't shoot anything) in order to activate my script.

Does anyone have any ideas? All I really need to do is get rid of the weapon smoke. Or activate the geiger script when the weapon is in the hands of the player. sad_o.gif

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">// Useraction class

class UserActions

{

class youraction

{

displayName="";

position="";

radius=6.000000;

condition="(player == commander this)";

statement="[this] exec {\youraddon\yourscript.sqs}";

just as an example of how to use a script within a user action

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  

×