KingN 251 Posted January 5, 2002 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
Black Op 0 Posted January 5, 2002 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
Damage Inc 0 Posted January 5, 2002 And this is mission editing stuff anyway. Share this post Link to post Share on other sites
RED 0 Posted January 5, 2002 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
RED 0 Posted January 5, 2002 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 ) RED Share this post Link to post Share on other sites
Rob 1 Posted January 5, 2002 #### you got there before me . lol Share this post Link to post Share on other sites
Damage Inc 0 Posted January 5, 2002 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
RED 0 Posted January 5, 2002 Never said there wasn't one, I just said that if there was one i forgot it RED Share this post Link to post Share on other sites
Damage Inc 0 Posted January 5, 2002 Well why didn't you read the official ComRef? Share this post Link to post Share on other sites