• 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] Half duration Spells

Status
Not open for further replies.
Level 9
Joined
Jun 7, 2008
Messages
440
I have an event in my map where units can duel it out arena style. Only thing is, i want all spells to have half duration in this area ONLY. Any ideas?

This doesn't need to be in GUI, It could be JASS as well.
 
Level 7
Joined
Jul 20, 2008
Messages
377
You could create a timer every time a spell is cast (unfortunately, there's no GetSpellDuration() function... I hope SC2 will feature that) and check which spell it is so you know their natural durations, then just set the timer to half that. When the timer expires, remove the appropriate buffs/debuffs.
 
Level 9
Joined
Jun 7, 2008
Messages
440
So basically, i need a boolean to switch to "true" and then start a timer which would expire at half since most durations are short, halving the timer would be generalized. Correct?
 
Level 7
Joined
Jul 20, 2008
Messages
377
Unfortunately, you'll have to also keep track of which timer affects which spell (and on which target). I suggest using local handle vars for that.

And the time you set the timer to should depend on the duration of the spell used. So it depends if your spells all have the same duration or not.
 
Level 12
Joined
Mar 16, 2006
Messages
992
Or you could just make a copy of every spell and give them half the duration. Swap em with triggers.
 
Level 4
Joined
Dec 10, 2005
Messages
73
You can do what Vegavak suggested or add more levels to that spell. Theses extra levels will contain the half durations but with same data.

Then just add levels to that spell.
eg I have a spell that goes up to level 3. I would make it to level 6.
Then just add current level of spell + 3 when they are in the arena.
Just make sure you have another trigger to stop the hero when he tries to go pass level 3.
 
Status
Not open for further replies.
Top