• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] Ammuntion Count Help!!!

Status
Not open for further replies.
Level 6
Joined
Sep 17, 2005
Messages
276
you have to use gold or wood for ammunition (in following i use wood) . for a simple ammo system use triggers like that:

Code:
TRIGGER 1:  ----Ammo decrease

EVENT:      unit-a unit is attacked

CONDITION:  <<< here conditions that only those players decrease ammo, which use ammo >>>
           ---for example---
           OR   
           - (owner of attacking unit) equal to player X
           - (owner of attacking unit) equal to player Y

ACTIONS:   add -1 lumber to (owner of attacking unit)


TRIGGER 2: ---If Ammo 0---

EVENT:    (player X) lumber less than or equal to 0
          (player Y) lumber less than or equal to 0
          ...

COND:     

ACTIONS: set (triggering player) alliance to player(enemy) to neutral


TRIGGER 3: ---Has ammo again---

EVENT:    (player X) lumber becomes greater than 0
          (player Y) lumber becomes greater than 0
          ...

COND:     

ACTIONS: set (triggering player) alliance to player(enemy) to enemy


hope that helps you. i created this system for my resevil map and it work all fine. :wink:
 
Status
Not open for further replies.
Top