• 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.

problem with a spell!!!

Status
Not open for further replies.
Level 3
Joined
Mar 27, 2006
Messages
29
ok i have made this spell where the hero attacks n he gains strength with every attack and after 15 sec his strength goes back to normal, sometimes it works jus fine with no problem but sometimes the hero loses strength after the spell turns off n sometimes the bonus strength he gains stay the same way.. it doesnt go back to normal...

can anyone help me out!!!
 
Level 3
Joined
Mar 27, 2006
Messages
29
heres the trigger!!! i am useing this one right now... and its working ok... didnt see tht bug.. but now there another bug.... wenever the hero levels up in the rage he doesnt gain the level up strength... it stays the same..


Trigger 1
Event
Unit - A unit starts the effect of an ability
condition
ability being cast = Innerrage
atctions
trigger - turn on innter rage attack
set innerragehero = casting unit
set innerrgeOGISTR = strength of innerragehero (exclude bonuses)
wait 15.00 game time seconds
hero modify strength of innerragehero set to innerrageOGISTR
trigger - turn off innerrage attack

Trigger 2
event a unit is attacked
condition
or any(conditions) are true
conditions
unit-type of attacking unit = the hero
actions
if - level of innerrage for the attacking unit = 1
then - hero modify strength of innerragehero: add 2
else - do nothing
if - level of innerrage for the attacking unit = 2
then - hero modify strength of innerragehero: add 3
else - do nothing
if - level of innerrage for the attacking unit = 3
then - hero modify strength of innerragehero: add 4
else - do nothing
 
Level 10
Joined
Apr 9, 2004
Messages
502
It's not working for a very small reason. See, you set it to store his strength when he CASTS the spell, so any strength gained after he casts is lost in the end. that requires a small fix. Still, if you want to get a more efficient and accurate display of his power gain, i'd suggest modifying your damage trigger a bit. You only set it to detect when this guy attacks a unit, you can constanbtly click attack on random units and increase his strength without damaging units because your trigger doesn't detect if he hits or not. If you like it like that, that's fine. If not, you can check out my latest spell map for a damage detection system that'll clear that right up. That way, it'll only increase his strength when he makes contact, factoriung in misses as well.

As for your simple problem problem, there's 2 solutions you can choose from:

1: you can detect when he levels, and add that strength bonus to the initial amount. You'd have to add to it too whenever he uses permanent str boost items. At that rate, you wouldn't have to change your spell at all. but before you try that, read option 2.

2. Here's an easier way that takes care of everything: Instead of worrying about his intial strength, monitor the CHANGE in strength instead, then subtract it after. That way, you don't have to worry about leveling, items, or anything of that sort, just the damage he gains. This proves a lot more efficient and would solve your problem.

But the choice is yours. Do whichever you prefer. But notice that it's always easier to tackle the object of focus than to look at everything around it. Everything around is always monitored by the wc3 engine, you just have to focus on what you change. Hope this helps, and if you have any questions, should you choose to add the damage detection system, feel free to e-mail me, or pm me.
 
Status
Not open for further replies.
Top