• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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