1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  4. Choose your ride to damnation in the 5th Special Effect Contest Poll.
    Dismiss Notice
  5. The winners of the 13th Techtree Contest have been announced!
    Dismiss Notice
  6. The 13th Music Contest Poll is up! Vote for the best tracks in this symphony of frost and flame.
    Dismiss Notice
  7. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  8. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

ammo system (diff)

Discussion in 'World Editor Help Zone' started by subressor, Feb 19, 2008.

  1. subressor

    subressor

    Joined:
    Mar 21, 2007
    Messages:
    155
    Resources:
    0
    Resources:
    0
    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:
     
  2. UreDe4D

    UreDe4D

    Joined:
    Nov 4, 2006
    Messages:
    1,196
    Resources:
    2
    Maps:
    2
    Resources:
    2
    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
     
  3. subressor

    subressor

    Joined:
    Mar 21, 2007
    Messages:
    155
    Resources:
    0
    Resources:
    0
    my god. that just might work =D tyvm. just 1 question. in my map i have levers. if i set the normal attack to zero will it still be able to "kill" the lever?
     
  4. Global_idiot

    Global_idiot

    Joined:
    Aug 16, 2007
    Messages:
    212
    Resources:
    0
    Resources:
    0
    You set mana draining in object editor on base casted spell. than trigger when unit mana becomes equal to 0 remove that based ability. if u undarstand what i mean...
     
  5. UreDe4D

    UreDe4D

    Joined:
    Nov 4, 2006
    Messages:
    1,196
    Resources:
    2
    Maps:
    2
    Resources:
    2
    hm i guess not, you can try, but would it be such a problem to use 1 as basic damage, you could kill your levers then
    or maybe you use a secondary attack

    and it should work cause i use the same thing for a map of my own :grin:
     
  6. Global_idiot

    Global_idiot

    Joined:
    Aug 16, 2007
    Messages:
    212
    Resources:
    0
    Resources:
    0
    Emm what are u two talking about??! about mana draining or base attack damage? and you can kill levers by setting them as (dunno like flyer)
    and set ability that deals only damage to flying units.
     
  7. UreDe4D

    UreDe4D

    Joined:
    Nov 4, 2006
    Messages:
    1,196
    Resources:
    2
    Maps:
    2
    Resources:
    2
    this is what i meant by using a secondary attack on the units, which enables them to attack only levers
     
  8. subressor

    subressor

    Joined:
    Mar 21, 2007
    Messages:
    155
    Resources:
    0
    Resources:
    0
    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 =(
     
  9. Need_O2

    Need_O2

    Joined:
    Aug 24, 2007
    Messages:
    2,880
    Resources:
    0
    Resources:
    0
    Set Unit Mana to Its mana -1
    and when it has no mana
    stop it when it tries to attack
     
  10. Valcrist

    Valcrist

    Joined:
    Jan 11, 2006
    Messages:
    111
    Resources:
    0
    Resources:
    0
    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
     
  11. subressor

    subressor

    Joined:
    Mar 21, 2007
    Messages:
    155
    Resources:
    0
    Resources:
    0
    yer. simple but effective. i like it. (could be a bit leaky though) ty