• 🏆 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!

Ability icons gone...

Status
Not open for further replies.
Level 3
Joined
Apr 6, 2012
Messages
22
I have a hero that (basically) has 3 passive abilities, one of which can be active at a time but these abilities can be switched through using another, active, ability.

How this works is that when the active ability is used, a trigger will check what passive the hero currently has and will:
1. Add the next-in-line passive to the hero
2. Set the next passive's level to that of the current one
3. Remove the current passive from the hero


I don't really want to put up the full trigger due it doing more than just this and being extremely long, but I'm pretty sure the trigger works anyways as the hero does get the bonuses from the passive, and these bonuses do switch through when the activate ability is used, but the problem is that for some reason these passives do not show up on the hero! The slot which is meant to contain the icon for the passive is just empty. No tooltip on hover, nothing.

And yes, the abilities do have icons.

I think I may have an idea as to why this happens, if you could confirm it for me before I go forth and change my map, I based the passives off of item abilities... Do Item abilities never show icons (even though I set Item Ability to false)?
 
Level 9
Joined
Jul 10, 2011
Messages
562
most item abilities dont show up an icon yes...

and to your trigger...if its really that long you should post it ^^ because what you wanna do is done in 1 short trigger xD
 
Level 3
Joined
Apr 6, 2012
Messages
22
Aha, that explains it, thank you :D

And the reason it's so long is because of it doing other things than just what I said.

If you really want to know, how my hero basically works is that he has 4 stances (Storm, Fire, Earth and Frost), and each one of his stances has 3 spells (2 actives, 1 passive) and 1 ultimate which is common for each stance.
Whenever the hero casts a spell or simply uses his ultimate, he then switches stance (gets a whole new set of spells). The trigger in question does not only take place when 1 ability is used, it actually takes place whenever he casts a spell and needs to replace 3 spells, not 1. I LIED IN MY OP! MWAHAHA!

Anyways, +rep.
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
I still agree with claptomanic: the triggers don't need to be long for that.
This seems enough for me:

Init Trigger

Change Stance-trigger

  • Actions
    • -------- Stance 1 --------
    • Set stanceAbilities[0] = Mana Burn
    • Set stanceAbilities[1] = Immolation
    • Set stanceAbilities[2] = Evasion
    • Set stanceAbilities[3] = Metamorphosis
    • -------- Stance 2 --------
    • Set stanceAbilities[4] = Endurance Aura
    • Set stanceAbilities[5] = Divine Shield
    • Set stanceAbilities[6] = Forked Lightning
    • Set stanceAbilities[7] = Avatar
    • -------- Stance 3 --------
    • Set stanceAbilities[8] = Mirror Image
    • Set stanceAbilities[9] = Thunder Clap
    • Set stanceAbilities[10] = Wind Walk
    • Set stanceAbilities[11] = Death And Decay
    • -------- Stance 4 --------
    • Set stanceAbilities[12] = Vampiric Aura
    • Set stanceAbilities[13] = Storm Bolt
    • Set stanceAbilities[14] = Cluster Rockets
    • Set stanceAbilities[15] = Bladestorm
    • -------- First Stance --------
    • Set stanceAbil1 = stanceAbilities[(stance x 4)]
    • Set stanceAbil2 = stanceAbilities[((stance x 4) + 1)]
    • Set stanceAbil3 = stanceAbilities[((stance x 4) + 2)]
    • Set stanceAbil4 = stanceAbilities[((stance x 4) + 3)]
  • Change Stance
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Wait 0.20 seconds
      • Game - Display to (All players) the text: test
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • stance Equal to 3
        • Then - Actions
          • Set stance = 0
        • Else - Actions
          • Set stance = (stance + 1)
      • Unit - Add stanceAbilities[(stance x 4)] to (Triggering unit)
      • Unit - Add stanceAbilities[((stance x 4) + 1)] to (Triggering unit)
      • Unit - Add stanceAbilities[((stance x 4) + 2)] to (Triggering unit)
      • Unit - Add stanceAbilities[((stance x 4) + 3)] to (Triggering unit)
      • Unit - Set level of stanceAbilities[(stance x 4)] for (Triggering unit) to (Level of stanceAbil1 for (Triggering unit))
      • Unit - Set level of stanceAbilities[((stance x 4) + 1)] for (Triggering unit) to (Level of stanceAbil2 for (Triggering unit))
      • Unit - Set level of stanceAbilities[((stance x 4) + 2)] for (Triggering unit) to (Level of stanceAbil3 for (Triggering unit))
      • Unit - Set level of stanceAbilities[((stance x 4) + 3)] for (Triggering unit) to (Level of stanceAbil4 for (Triggering unit))
      • Unit - Remove stanceAbil1 from (Triggering unit)
      • Unit - Remove stanceAbil2 from (Triggering unit)
      • Unit - Remove stanceAbil3 from (Triggering unit)
      • Unit - Remove stanceAbil4 from (Triggering unit)
      • Set stanceAbil1 = stanceAbilities[(stance x 4)]
      • Set stanceAbil2 = stanceAbilities[((stance x 4) + 1)]
      • Set stanceAbil3 = stanceAbilities[((stance x 4) + 2)]
      • Set stanceAbil4 = stanceAbilities[((stance x 4) + 3)]
That changes the entire set of spells after a spell is cast.

With JASS that could be shortened a bit, but this seems good enough.
Another option to shorten it is by using loops, but then you need an ability array instead of the 4 ability variables I used (I prefer using single variables over arrays).
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
I still agree with claptomanic: the triggers don't need to be long for that.
This seems enough for me:

Init Trigger

Change Stance-trigger

  • Actions
    • -------- Stance 1 --------
    • Set stanceAbilities[0] = Mana Burn
    • Set stanceAbilities[1] = Immolation
    • Set stanceAbilities[2] = Evasion
    • Set stanceAbilities[3] = Metamorphosis
    • -------- Stance 2 --------
    • Set stanceAbilities[4] = Endurance Aura
    • Set stanceAbilities[5] = Divine Shield
    • Set stanceAbilities[6] = Forked Lightning
    • Set stanceAbilities[7] = Avatar
    • -------- Stance 3 --------
    • Set stanceAbilities[8] = Mirror Image
    • Set stanceAbilities[9] = Thunder Clap
    • Set stanceAbilities[10] = Wind Walk
    • Set stanceAbilities[11] = Death And Decay
    • -------- Stance 4 --------
    • Set stanceAbilities[12] = Vampiric Aura
    • Set stanceAbilities[13] = Storm Bolt
    • Set stanceAbilities[14] = Cluster Rockets
    • Set stanceAbilities[15] = Bladestorm
    • -------- First Stance --------
    • Set stanceAbil1 = stanceAbilities[(stance x 4)]
    • Set stanceAbil2 = stanceAbilities[((stance x 4) + 1)]
    • Set stanceAbil3 = stanceAbilities[((stance x 4) + 2)]
    • Set stanceAbil4 = stanceAbilities[((stance x 4) + 3)]
  • Change Stance
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Wait 0.20 seconds
      • Game - Display to (All players) the text: test
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • stance Equal to 3
        • Then - Actions
          • Set stance = 0
        • Else - Actions
          • Set stance = (stance + 1)
      • Unit - Add stanceAbilities[(stance x 4)] to (Triggering unit)
      • Unit - Add stanceAbilities[((stance x 4) + 1)] to (Triggering unit)
      • Unit - Add stanceAbilities[((stance x 4) + 2)] to (Triggering unit)
      • Unit - Add stanceAbilities[((stance x 4) + 3)] to (Triggering unit)
      • Unit - Set level of stanceAbilities[(stance x 4)] for (Triggering unit) to (Level of stanceAbil1 for (Triggering unit))
      • Unit - Set level of stanceAbilities[((stance x 4) + 1)] for (Triggering unit) to (Level of stanceAbil2 for (Triggering unit))
      • Unit - Set level of stanceAbilities[((stance x 4) + 2)] for (Triggering unit) to (Level of stanceAbil3 for (Triggering unit))
      • Unit - Set level of stanceAbilities[((stance x 4) + 3)] for (Triggering unit) to (Level of stanceAbil4 for (Triggering unit))
      • Unit - Remove stanceAbil1 from (Triggering unit)
      • Unit - Remove stanceAbil2 from (Triggering unit)
      • Unit - Remove stanceAbil3 from (Triggering unit)
      • Unit - Remove stanceAbil4 from (Triggering unit)
      • Set stanceAbil1 = stanceAbilities[(stance x 4)]
      • Set stanceAbil2 = stanceAbilities[((stance x 4) + 1)]
      • Set stanceAbil3 = stanceAbilities[((stance x 4) + 2)]
      • Set stanceAbil4 = stanceAbilities[((stance x 4) + 3)]
That changes the entire set of spells after a spell is cast.

With JASS that could be shortened a bit, but this seems good enough.
Another option to shorten it is by using loops, but then you need an ability array instead of the 4 ability variables I used (I prefer using single variables over arrays).

its something like http://www.hiveworkshop.com/forums/spells-569/libram-v3-0-0-0-a-193521/ in gui :p
 
Level 3
Joined
Apr 6, 2012
Messages
22
Don't worry, it's not "very long". It's probably about the size of your trigger, ap0calypse. Doesn't change the fact that I don't really want to be typing the [WC3] tags version of my trigger over, when (as I did) I could just type what the 3 important lines actually did.

+Repping you for being willing to help though :)

Oh, and if anyone is interested, I solved my problem by making some dummy passives which will be added and removed along with the real passives.
 
Status
Not open for further replies.
Top