ammo system (diff)

Status
Not open for further replies.
Level 5
Joined
Mar 21, 2007
Messages
155
hi. i am trying to make a type of ammo system. (i don't need to go into detail, your all smart ^^) where the MANA is ammo. i cannot use lumber or gold. i want to make it where each SHOT fired deducts 1 mana. and you know, 0 mana = won't allow him to fire. but there isn't an option in the world editor to deduct 1 mana. will i have to call on jass? (god i hate it)

thanks :thumbs_up:
 
Level 14
Joined
Nov 4, 2006
Messages
1,240
why don't you just use an ability like flame arrow needing 1 manapoint per shot and give the unit 1-1 damage. then do a trigger which disables a units attack when mana reaches 0

or the other way round if you want to see the damage, give the unit the damage you like and make the ability having 1 damage, same trigger when mana is 0
 
Level 5
Joined
Mar 21, 2007
Messages
155
na its ok. thats a good thing actually. coz then they have a weak attack (i'm gonna say that its the gun pressurizing air =p) tyvm both guys =D

but now i feel so stupid for not thinking of that in the first place. god i suck =(
 
Level 5
Joined
Jan 11, 2006
Messages
110
i believe this is what you want. It uses no abilities, just triggers, so the attack will stay as the units damage and will still be affected by armor

  • ManaAmmo
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Mana of (Attacking unit)) Greater than 0.00
        • Then - Actions
          • Unit - Set mana of (Attacking unit) to ((Mana of (Attacking unit)) - 1.00)
        • Else - Actions
          • Unit - Order (Attacking unit) to Stop
The only problem with this is that doodads will not use ammo, but you can always set up another trigger that works of of them.

Also make sure to remove mana regeneration, and set you mana to a reasonable amount of ammo. Then all you need is mana potions for ammo, without the mana regain effect, so it doesnt look like magic
 
Status
Not open for further replies.
Top