Jump to content
Sign in to follow this  
quakergamer

Weapon firing mode scripting problem

Recommended Posts

Hello!

Please look at this first :

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

_WeaponMode = _this select 3

? _WeaponMode = Single : exit

Basically _this select 3 when executing a fired event handler script will return the weapon firing mode (Single, Burst or FullAuto).

If i write something like this after that

_soldier = _this select 0

_soldier groupchat _WeaponMode

it will write the firing mode in the Chat Bar BUT if I want the script to exit if you fire the gun at the "single" firing MODE well it ignores it and still does the rest of the script even if its supposed to exit !!

Any ideas about that ?

Later!

Share this post


Link to post
Share on other sites

This maybe ?

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

_WeaponMode = _this select 3

? _WeaponMode = "Single" : exit

edit: oops what Suma said

Share this post


Link to post
Share on other sites

Do not use ? _WeaponMode = Single : exit, use ? _WeaponMode == "Single" : exit instead.

Share this post


Link to post
Share on other sites

Thank you BraTTy and Suma! Finally the weapon jam script works correctly AND is realistic biggrin_o.gif!

Thank you all for your help!

later!

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  

×