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

[Trigger] I need help with a passive spell

Status
Not open for further replies.
Level 5
Joined
Mar 16, 2013
Messages
108
Hi everyone, i need help with a custom spell that im making D:
apologizes for my bad english. It isnt my mother language

Im triyng a stack spell, similar to Nasus Q from league of legends.
Everytime a unit is attacked by the hero, he have a chance to stack 1 strenght point.
I made an strenght spell with 100 levels and put it in a book spell to hide it, but
The problem is that the events are working, but the actions doesnt do anything, the level of my dummy passive spell dont come up, so i cant get the bonus strenght.

Can anyone help me? apologizes for my bad english, it isnt my mother language


  • Stack Passive
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Attacking unit) Equal to MyHero <gen>
    • Actions
      • Set TempInt = (Random integer number between 1 and 3)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TempInt Equal to a 3
        • Then - Actions
          • Set Spell_Int = ((Level of DummyStrengthPassive for MyHero <gen>) + 1)
          • Unit - Set level of DummyStrengthPassive for MyHero <gen> to Spell_Int
        • Else - Actions
 
Last edited:
Level 20
Joined
May 16, 2012
Messages
635
I would suggest you trigger the whole spell, instead of using a dummy ability. it will save you some time and you will not be limited by the spell max level (unless you want it to be limited), and you will not have a ability in your object editor with hundreds of levels. To do that simply use the GUI Action function "Hero - Modify Hero Attribute" and add 1 to "Attacking Unit" Strength. I suggest you also use a random number between 1 and 100 to get a better percentage chance, like "Random Number between 1 and 100 Less Than or Equal To 33".
 
Level 24
Joined
Feb 9, 2009
Messages
1,787
Additionally unnecessary levels to the object editor will increase the map's load time.

I highly recommend Bribe's Unit indexer:
udg_Siphoning_Strike[Custom value of Attacking Unit] + 1/2/3

Hell, take damage engine and with the Orc - Berserk ability(this ability since it doesn't interrupt orders):
damageeventmodifer = 1.00
condition damage event source has buff "Siphoning Strike" = true
remove Siphoning Strike from damage event source
set damage event amount to damage event amount + udg_Siphoning_Strike[Custom value of Damage Event Source]
 
Level 5
Joined
Mar 16, 2013
Messages
108
Hi again, I was able to solve the spell as I wanted in two triggers, ill put an example here:


  • Stack Passive
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Level of PassiveSpell for MyHero <gen>) Greater than or equal to 1
      • (Attacking unit) equal to MyHero <gen>
    • Actions
      • Set TempInt = (Random integer number between 1 and 100)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TempInt Less than or equal to CustomProbability
        • Then - Actions
          • Set PassiveSpell_Int = (PassiveSpell_Int + 1)
          • Unit - Increase level of DummyPassiveStrenght for MyHero <gen>
  • Stack Passive Periodic Decrease
    • Events
      • Time - Every 7.00 seconds of game time
    • Conditions
      • PassiveSpell_Int Not equal to 0
    • Actions
      • If (( MyHero is dead) Equal to True) then do Skip Remaining Actions
      • Set PassiveSpell_Int = (PassiveSpell_Int - 1)
      • Unit - Decrease level of DummyPassiveStrenght for MyHero <gen>


Thanks a lot for all the answers <3
 
Status
Not open for further replies.
Top