Jump to content
Sign in to follow this  
quakergamer

Exit if main weapon is fired , continue if scnd

Recommended Posts

Hello,

I want to know how can I make a script that will exit if the PrimaryWeapon of the soldier is fired and continue if the second one (Missiles Launchers) is fired. The script should be activated by the fired event handler!

This is how I tried to make it work, but it doesnt sad_o.gif

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

_unit = _this select 0

_weapon = this select 1

_Launcher = secondaryWeapon _unit

[...]

?! _weapon = _launcher: exit

Share this post


Link to post
Share on other sites

The last line should should be:

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

?! _weapon == _launcher: exit

or

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

? _weapon != _launcher: exit

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  

×