Problems with my Ammo Sistem

Status
Not open for further replies.
I was created my ammo sistem:

I have added mana for all units.

Lose ammo triger:

Events:
Unit - A unit is attacked.
Action:
Set mana of attacking unit to mana of attacking unit - 1.

No ammo triger:

Events:
Unit - A unit is attacked.
Condition:
Mana of attacking unit is equal to 0.
Action:
Issue order to attacking unit stop


This is okay, but if I use the attack ground order, the unit dont loses mana, and can attack ground without ammo.

How make the unit lose ammo attacking the ground?
 
Something like:
Code:
Ammo System
    Events
        Unit - A unit Is attacked
    Conditions
    Actions
        If ((Mana of (Attacking unit)) Greater than 0.00) then do (Do nothing) else do (Unit - Order (Attacking unit) to Stop)

But the detection system of attacks in GUI sucks.
Thats why I'm learning JASS :)
 
Status
Not open for further replies.
Back
Top