• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] tough trigger needed!

Status
Not open for further replies.
Level 9
Joined
Jan 14, 2008
Messages
366
okay so what i want to do is the following:

the unit buys a powerup from a shop. the powerups name is equivalent to the ability that buying the powerup will give the hero.

BUT, abilities should not overwrite each other. they all occupy the same hotkey slot.

so when a hero buys apowerup, the trigger must check wether the bought powerup is equivalent to the ability the hero already has BECAUSE

if it is: set that abilities level+1
if its not: show error message
if there is no ability: give the hero that ability (set to level 1)




  • ability bought
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Item-type of (Item being manipulated)) Equal to Battlecry
          • (Item-type of (Item being manipulated)) Equal to Berserk
          • (Item-type of (Item being manipulated)) Equal to Blink
          • (Item-type of (Item being manipulated)) Equal to Healing touch
          • (Item-type of (Item being manipulated)) Equal to Invisibility
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
        • Else - Actions
thats as far as i can get! since there is no "has unit ability" boolean i can't possibly check!

any help immensly appreciated!
 
Status
Not open for further replies.
Top