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

Need help with gui spell

Status
Not open for further replies.
Level 3
Joined
Oct 29, 2007
Messages
15
So baically the spell does this:
5% chance when attacking an enemy unit to increase the hero's strength by Level of Ability*Current hero strength for 10 seconds.

The problem is, getting the hero's strength to go back to what it was before the added strength.

Here's what i have so far

  • Events
  • Unit - A unit is attacked
  • Conditions
  • (Level of Abomination's Might for (Attacking unit)) Greater than or equal to 1
  • Actions
  • Set AmCasterStartStr = (Strength of AMCaster (Exclude bonuses))
  • Set AMCaster = (Attacking Unit)
  • if (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • Chance less than or equal to 5
  • Then - Actions
  • Hero - Modify Strength of AMCaster: Add ((Strength of AMCaster (Exclude bonuses)) x (Level of Abomination's Might for AMCaster))
  • Trigger - Turn on Abomination's Might Cooldown <gen>
  • Trigger - Turn off (This trigger)
  • Else - Actions
  • Do nothing
Abomination's might cooldown makes it so it can only happen once per 10 seconds.. probably not a good way to do it but I'm not sure of another way. Also the chance variable is set in a different trigger to be 1-100.

Anyway the problem seems to be that AMCasterStartStr isn't retaining the STR before its added, but rather after its added which results usually in an extra large amount of str permanently.

Fixed on my own, thanks for the tip, it was a really stupid mistake but i haven't slept in over a day :(
 
Last edited:
Level 6
Joined
Jul 22, 2008
Messages
243
I can't really help you out without seing the rest of the triggers, but a tip for ya; Remember to get a trigger for the change of strength when the unit levels if it's under the effect at the time.
 
Status
Not open for further replies.
Top