• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

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