Jump to content
Sign in to follow this  
KingN

Fire activation

Recommended Posts

I need to know how to activate a trigger when a unit fires with a weapon. Does somebody know? Thanks.

Share this post


Link to post
Share on other sites

try asking in mission eidting, the really good scripting guys like rob and RED only really visit that forum

Share this post


Link to post
Share on other sites

Well just an idea you could not detect the fire it's self just the ammout of ammo left in the gun, maybe a start in this would be :

#start

~1

_ammo = (put the number of bullets you are wanting the player to have here)

?(_ammo == _ammo - 1):goto "start"

hint (gun fired)

RED

Share this post


Link to post
Share on other sites

Oh and this will only work if the player hab't shot anything before the script is activated, i forgot the way of checking the ammont of ammo a unit has ( if there even is one smile.gif )

RED

Share this post


Link to post
Share on other sites

#### you got there before me . lol tounge.gif

Share this post


Link to post
Share on other sites

From the official comref:

unit ammo magazine

Operand types:

unit: Object

magazine: String

Type of returned value:

Number

Description:

Count how many shots are left for given magazine type.

Example:

player ammo "M16"

So there is a way of counting the player's ammo.

Share this post


Link to post
Share on other sites

Never said there wasn't one, I just said that if there was one i forgot it smile.gif

RED

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  

×