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!
I was always intrigued by the Defend ability and I think it has a really neat mechanic to it - the deflection part. However there is one thing I dislike on the original ability and that is the toggle aspect of it. This is why I decided to remake this ability making it a regular spell cast with a duration and a cooldown. I am by no means a WE expert so please excuse the use of "wait" function, I found no way around it. Oh yes this ability also deflects attacks of magical type which is intended, this can be changed in the object editor.
The spell itself is fairly simple and is MUI, but if anyone needs an explanation for the triggers and my reasoning behind them feel free to ask. I dont ask for approval but I could use some directions regarding solving of my "wait" problem. So some constructive feedback appreciated =D.
PS: Please dont mind the map itself, it is something I do in the free time to entertain myself
PPS: For fellow spell testers - the trolls are meant to attack the guards, triggering their Defend, you can try the spell at the neutral camps. Dont expect the trolls to attack your units.
HUGE EDIT: Removed the waits completely, changed variable names, added a hero leveled version of the spell. Should hopefully work (it did for me). There should be no memory leaks as no unit groups, locations or other variables for that matter were created. Feel free to point out any mistakes, I couldnt find any anymore.
EDIT 2: Okay this is hopefully the last edit. I added import instructions for even bigger World Editor nubs than me x). Although this spell is really simple, it is meant to be used in a regular melee map - NO FANCY BZNS. I believe it is fairly well balanced as it has roughly 50% deflection uptime as opposed to 30% of the default ability, however it doesnt reduce incoming damage in the spare time. Thats about all I wanted to add and I hope at least someone finds this spell useful. PEACE!!
Triggers (only the spell related ones - only hero version, unit version is the same without levels):
Defend
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Defend Custom (hero)
Actions
Set Defend_MaxIndex = (Defend_MaxIndex + 1)
Set Defend_Caster[Defend_MaxIndex] = (Triggering unit)
Set Defend_Counter[Defend_MaxIndex] = (4.00 + (Real((Level of Defend Custom (hero) for Defend_Caster[Defend_MaxIndex]))))
Animation - Add the defend animation tag to Defend_Caster[Defend_MaxIndex]
Unit - Add Spell Book, Defend to Defend_Caster[Defend_MaxIndex]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Defend_MaxIndex Equal to 1
Then - Actions
Trigger - Turn on DefendLoop <gen>
Else - Actions
DefendLoop
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
For each (Integer Defend_CurrentIndex) from 1 to Defend_MaxIndex, do (Actions)
Loop - Actions
Set Defend_Counter[Defend_CurrentIndex] = (Defend_Counter[Defend_CurrentIndex] - 0.03)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Defend_Counter[Defend_CurrentIndex] Less than or equal to 0.00
Then - Actions
Animation - Remove the defend animation tag to Defend_Caster[Defend_CurrentIndex]
Unit - Remove Spell Book, Defend from Defend_Caster[Defend_CurrentIndex]
Set Defend_Caster[Defend_CurrentIndex] = Defend_Caster[Defend_MaxIndex]
Set Defend_Counter[Defend_CurrentIndex] = Defend_Counter[Defend_MaxIndex]
Set Defend_MaxIndex = (Defend_MaxIndex - 1)
Set Defend_CurrentIndex = (Defend_CurrentIndex - 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Well... Im a super nub so no idea how to post triggers. I remember in the past I attempted to replace waits with a "timer expires" event, however I wasnt able to add an array to the timer in the event so it completely defeated the purpose of it making it not MUI. I really want to get better at this now though, that is why I posted this simple spell here to get a feedback. =D
I will post the triggers here once I figure out how..
well, this is the first time I see an indexing like that. It's actually works 100% but I dont know mods will approve it or not (as far as I know mods never lets spell with polled wait approved) but anyway, good luck with it,..
The trolls are too strong, they are there to demonstrate the deflection by the guards (they die in one deflect). You can walk up to the neutral camps and try it out yourself there. Thats how I intended it anyways, shoulda written it in the description :/.
well, this is the first time I see an indexing like that. It's actually works 100% but I dont know mods will approve it or not (as far as I know mods never lets spell with polled wait approved) but anyway, good luck with it,..
I understand. Ive been lectured on the waits before... The thing is I have no idea how to replace them, Ive tried a lot of methods before but in the end they always create more problems than they solved. Maybe if I created a timer event for every index from 1-100 individually to replace the waits. This would be semi MUI as long as there arent over 100 units casting at the same time (I think???). However this would 1. take ages to create all the triggers 2. take up so much space itd look disgusting. Im too dumb for this v_v.
PS: I should really just edit my posts instead of clogging up the space here. GJ ME
I dont see any reason to change the variable names - doesnt seem very important. But I suppose it could be done if someone wants to copy this spell into his map where hes already using those variable names for something different.
As for the leves, wouldnt be too hard but Id first like to get rid of the wait somehow.
I tried setting the movement speed at object editor but it doesnt work for the passive ability only the toggle, so I had to set it in the trigger.
it "just" looks hard. you are just too lazy to read it completely.. I have recently learn something. you can also use countdown timer to make this works. I bet your system fails because you use timer variable with array. you should initialize the variable first.
use custom script
Custom script: set udg_countdowntimer[index] = CreateTimer()
it "just" looks hard. you are just too lazy to read it completely.. I have recently learn something. you can also use countdown timer to make this works. I bet your system fails because you use timer variable with array. you should initialize the variable first.
use custom script
Custom script: set udg_countdowntimer[index] = CreateTimer()
Yeah Im starting to get a hold of it. I was using a countdown timer with an array action yes. In the second trigger Id use "the timer has expired" as an event however I wasnt able to put an index variable as an array in the second trigger determining which timer Im refering to, so there was no point to use it.
I dont understand the custom scripts too well. If I fail to understand the tutorial I might PM you later on and ask for some questions. If you dont mind of course.
Edit: Nvm, I think I understand the tutorial perfectly. I will try to correct my spell now and update it once I get it working. Maybe make it a hero ability with levels as well. =D
Damn I shoudlve noticed that, too tired to think atm. Well it wouldnt work if I used more complex non linear durations (or maybe you would prove me wrong once again). Ill fix that right away.
As for the rest of the stuff, is it alright?
EDIT: Did as you told me to, the loop trigger looks overall more smooth now without "if" conditions for every level of the spell. Hopefully thats all.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.