• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Ability Replacement on heroes

Status
Not open for further replies.
Level 8
Joined
Aug 15, 2010
Messages
216
Hey everyone!
So i'm back after all this time still asking stupid questions, but...
i'd really like some help right now from you bros, so here we go:
I'm working on my new map, nothing srs, just something for me and my bros i did like 60% of the terrain and i decided to make a hero.

the problem is with on of his abilities, or so too say his whole system of abilities.
Here is the whole deal:
When he uses his ability, Touch of incineris, he places a buff on an enemy. then IF he uses each one of two of his abilities on that target (Asherbite and Sun Blast), he gains a charge of Incinerium (which is displayed on his normal passive ability), When he gains 6 charges, his Sun blast ability SHOULD transform into Incineris blast, doubling its damage and its healing.
but guess what? it doesnt :'(
Here are the triggers
  • Sun blast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Sun blast (Neutral Hostile)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Target unit of ability being cast) has buff |CFF6633FFTouch Of Incineris|r) Equal to True
        • Then - Actions
          • Set Playernumber[1] = (Player number of (Owner of (Casting unit)))
          • Set Incinerium[Playernumber[1]] = (Incinerium[Playernumber[1]] + 1)
          • Unit - Set level of Incinerium (Spell Breaker) for (Casting unit) to (Incinerium[Playernumber[1]] + 1)
          • Floating Text - Create floating text that reads (|c00FF8000 + ((String(Incinerium[Playernumber[1]])) + Charges)) above (Casting unit) with Z offset 0.00, using font size 8.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 34.00 towards (Random real number between 30.00 and 150.00) degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
        • Else - Actions
      • Set CasterInt[1] = (Intelligence of (Casting unit) (Include bonuses))
      • Set CasterStr[1] = (Strength of (Casting unit) (Include bonuses))
      • Set SpellLevel = (Level of (Ability being cast) for (Casting unit))
      • Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing ((0.50 x (Real(SpellLevel))) x ((Real(CasterStr[1])) + (Real(CasterInt[1])))) damage of attack type Spells and damage type Normal
      • Set HealAmount = ((0.50 x (Real(SpellLevel))) x (Real(CasterInt[1])))
      • Unit - Set life of (Triggering unit) to ((Life of (Casting unit)) + HealAmount)
      • Floating Text - Create floating text that reads (|c0046FF46+ + (String((Integer(HealAmount))))) above (Casting unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
      • Floating Text - Set the velocity of (Last created floating text) to 100.00 towards (Random real number between 30.00 and 150.00) degrees
      • Floating Text - Change (Last created floating text): Disable permanence
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Incinerium[Playernumber[1]] Equal to 6
        • Then - Actions
          • Set Incinerium[Playernumber[1]] = 0
          • Unit - Set level of Incinerium (Spell Breaker) for (Casting unit) to 1
          • Special Effect - Destroy (Last created special effect)
          • Set HellionboltLvl = (Level of Sun blast (Neutral Hostile) for (Casting unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • HellionboltLvl Greater than 0
            • Then - Actions
              • Unit - Remove Sun blast (Neutral Hostile) from (Casting unit)
              • Hero - Learn skill for (Casting unit): Incineris Blast (Neutral Hostile)
              • Unit - Set level of Incineris Blast (Neutral Hostile) for (Casting unit) to HellionboltLvl
            • Else - Actions
        • Else - Actions
  • Asherbite
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Asherbite
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Target unit of ability being cast) has buff |CFF6633FFTouch Of Incineris|r) Equal to True
        • Then - Actions
          • Set Playernumber[1] = (Player number of (Owner of (Casting unit)))
          • Set Incinerium[Playernumber[1]] = (Incinerium[Playernumber[1]] + 1)
          • Unit - Set level of Incinerium (Spell Breaker) for (Casting unit) to (Incinerium[Playernumber[1]] + 1)
          • Floating Text - Create floating text that reads (|c00FF8000 + ((String(Incinerium[Playernumber[1]])) + Charges)) above (Casting unit) with Z offset 0.00, using font size 8.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 34.00 towards (Random real number between 30.00 and 150.00) degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
        • Else - Actions
      • Set CasterInt[1] = (Intelligence of (Casting unit) (Include bonuses))
      • Set CasterStr[1] = (Strength of (Casting unit) (Include bonuses))
      • Set SpellLevel = (Level of (Ability being cast) for (Casting unit))
      • Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing ((0.50 x (Real(SpellLevel))) x ((Real(CasterStr[1])) + 0.00)) damage of attack type Spells and damage type Normal
      • Set HealAmount = ((0.50 x (Real(SpellLevel))) x (Real(CasterStr[1])))
      • Unit - Set mana of (Casting unit) to ((Mana of (Casting unit)) + HealAmount)
      • Floating Text - Create floating text that reads (|c000080FF+ + (String((Integer(HealAmount))))) above (Casting unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
      • Floating Text - Set the velocity of (Last created floating text) to 100.00 towards (Random real number between 30.00 and 150.00) degrees
      • Floating Text - Change (Last created floating text): Disable permanence
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Incinerium[Playernumber[1]] Equal to 6
        • Then - Actions
          • Set Incinerium[Playernumber[1]] = 0
          • Unit - Set level of Incinerium (Spell Breaker) for (Casting unit) to 1
          • Set HellionboltLvl = (Level of Sun blast (Neutral Hostile) for (Casting unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • HellionboltLvl Greater than 0
            • Then - Actions
              • Unit - Remove Sun blast (Neutral Hostile) from (Casting unit)
              • Hero - Learn skill for (Casting unit): Incineris Blast (Neutral Hostile)
              • Unit - Set level of Incineris Blast (Neutral Hostile) for (Casting unit) to HellionboltLvl
            • Else - Actions
        • Else - Actions
  • Asherbite
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Asherbite
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Target unit of ability being cast) has buff |CFF6633FFTouch Of Incineris|r) Equal to True
        • Then - Actions
          • Set Playernumber[1] = (Player number of (Owner of (Casting unit)))
          • Set Incinerium[Playernumber[1]] = (Incinerium[Playernumber[1]] + 1)
          • Unit - Set level of Incinerium (Spell Breaker) for (Casting unit) to (Incinerium[Playernumber[1]] + 1)
          • Floating Text - Create floating text that reads (|c00FF8000 + ((String(Incinerium[Playernumber[1]])) + Charges)) above (Casting unit) with Z offset 0.00, using font size 8.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 34.00 towards (Random real number between 30.00 and 150.00) degrees
          • Floating Text - Change (Last created floating text): Disable permanence
          • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
        • Else - Actions
      • Set CasterInt[1] = (Intelligence of (Casting unit) (Include bonuses))
      • Set CasterStr[1] = (Strength of (Casting unit) (Include bonuses))
      • Set SpellLevel = (Level of (Ability being cast) for (Casting unit))
      • Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing ((0.50 x (Real(SpellLevel))) x ((Real(CasterStr[1])) + 0.00)) damage of attack type Spells and damage type Normal
      • Set HealAmount = ((0.50 x (Real(SpellLevel))) x (Real(CasterStr[1])))
      • Unit - Set mana of (Casting unit) to ((Mana of (Casting unit)) + HealAmount)
      • Floating Text - Create floating text that reads (|c000080FF+ + (String((Integer(HealAmount))))) above (Casting unit) with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
      • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
      • Floating Text - Set the velocity of (Last created floating text) to 100.00 towards (Random real number between 30.00 and 150.00) degrees
      • Floating Text - Change (Last created floating text): Disable permanence
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Incinerium[Playernumber[1]] Equal to 6
        • Then - Actions
          • Set Incinerium[Playernumber[1]] = 0
          • Unit - Set level of Incinerium (Spell Breaker) for (Casting unit) to 1
          • Set HellionboltLvl = (Level of Sun blast (Neutral Hostile) for (Casting unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • HellionboltLvl Greater than 0
            • Then - Actions
              • Unit - Remove Sun blast (Neutral Hostile) from (Casting unit)
              • Hero - Learn skill for (Casting unit): Incineris Blast (Neutral Hostile)
              • Unit - Set level of Incineris Blast (Neutral Hostile) for (Casting unit) to HellionboltLvl
            • Else - Actions
        • Else - Actions
If you'd be kind to read these and say out my failure in life, i'd be happy.

Thanks :)
 
Level 8
Joined
Aug 15, 2010
Messages
216
i did this
  • Unit - Remove Sun blast (Neutral Hostile) from (Casting unit)
  • Hero - Learn skill for (Casting unit): Incineris Blast (Neutral Hostile)
  • Unit - Add Incineris Blast (Neutral Hostile) to (Casting unit)
  • Unit - Set level of Incineris Blast (Neutral Hostile) for (Casting unit) to HellionboltLvl
but still no response
 
Level 15
Joined
Oct 29, 2012
Messages
1,474
Don't use Casting Unit, Use Triggering Unit , because Casting Unit is slow regarding to other actions, I will investigate the trigger

First, I don't find the benefit of this ITE , since the unit casts an ability and then you check if its level is more than 0 , of course it is, use ITE just in case of something not determined. Look , just remove the ITE and all 'then' actions put them without ITE :
  • Set HellionboltLvl = (Level of Sun blast (Neutral Hostile) for (Casting unit))
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • HellionboltLvl Greater than 0
  • Then - Actions
  • Unit - Remove Sun blast (Neutral Hostile) from (Casting unit)
  • Hero - Learn skill for (Casting unit): Incineris Blast (Neutral Hostile)
  • Unit - Set level of Incineris Blast (Neutral Hostile) for (Casting unit) to HellionboltLvl
  • Else - Actions
Second, I don't think you even destroy any effect here, ( First Trigger )
  • Special Effect - Destroy (Last created special effect)
Before I search more, what's the exact issue without telling me how spells work ?
 
Level 8
Joined
Aug 15, 2010
Messages
216
Its that, the spell has to be removed and replaced with an upgraded new one, but it doesnt/ it just removes sun blast and does nothing else...

and the ITE is used for the second spell, Asherbite, becuase if the player didnt take the basic sun blast at early levels, with this trigger it gains it to him for free.

i fixed the special effect removal, thanks for pointing it out.
 
Level 25
Joined
May 11, 2007
Messages
4,650
You cannot learn hero spells if the hero doesn't have it or if the hero doesn't have points to learn it.

So if the hero already has the spell, use hero - add points 1
and then hero - learn spell

if the hero doesn't have the spell from the beginning, you cannot "learn" them like the normal way, but has to do it through triggers with unit - add ability.
 
Level 8
Joined
Aug 15, 2010
Messages
216
You cannot learn hero spells if the hero doesn't have it or if the hero doesn't have points to learn it.

So if the hero already has the spell, use hero - add points 1
and then hero - learn spell

if the hero doesn't have the spell from the beginning, you cannot "learn" them like the normal way, but has to do it through triggers with unit - add ability.

I'll try that, thanks. but is it Reverseable? If yes, then how can the point be reversed?

Another point, when i use unit - remove ability, if the hero has skill points while it has the new ability, he can learn the first ability as well. how can i pervent this?
 
Level 12
Joined
Nov 3, 2013
Messages
989
I'll try that, thanks. but is it Reverseable? If yes, then how can the point be reversed?

Another point, when i use unit - remove ability, if the hero has skill points while it has the new ability, he can learn the first ability as well. how can i pervent this?

You need to use tome of retaining to reset the levels.
 
Level 4
Joined
Nov 27, 2012
Messages
85
Another point, when i use unit - remove ability, if the hero has skill points while it has the new ability, he can learn the first ability as well. how can i pervent this?

Try action "Player - Disable Ability for Player"
 

Kazeon

Hosted Project: EC
Level 34
Joined
Oct 12, 2011
Messages
3,449
You will need 3 abilities here to make it safe.

1. Sun blast (Unit)

2. Incineris Blast (Unit)

3. Learned ability (Hero)
You can use item damage bonus with 0 bonus here, so when you learn, the icon wont be displayed.

Don't remove Hero abilities, since it will reset the level and you need skill points to learn it again.

Or if MPI is okay for you, just dont remove the ability completely. Use disable ability for player feature.

Hope it helps...
 
Status
Not open for further replies.
Top