• 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.

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?
 
Level 19
Joined
Nov 16, 2006
Messages
2,165
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.
Top