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

how to catch a cooldown

Status
Not open for further replies.
Level 3
Joined
May 19, 2008
Messages
32
hi
im working on a teleportation spell where i store the teleportet unit in gamecache, and a few second later restore it in a different location. However this way i cannot catch the spell cooldown and loose all spell cooldowns that are in progress

any ideas how to get around this problem ?



the idea of the spell is to make the unit disappear at A, make a dummy move from A to B, then let the unit appear at B when the dummy arrives there, so i need a break between disappearing and appearing...
 
Level 3
Joined
May 19, 2008
Messages
32
i thought of that but found i a bit unclean ... but if theres no way to somehow store the cd ...

thanx

dunno about pausing the unit, one would have to move it away anyways ... maybe it helps to pause the cd's while the spell is in action ... if thats desired
 
Level 6
Joined
Jul 25, 2005
Messages
221
Lets see if I understand this, you are creating a teleporting spell whereas you want your teleportee to move to when the dummy arrives? The old physics formula
Distance * Velocity = Time, where distance is distance between heroes point to the point targeted, velocity being the dummy movespeed (or hero movespeed) and time being... well time :p. So, you can create a timer for when the unit "arrives" to its location in that way.

Set TimeForTravel = Distance between PointA and PointB * Unit Move Speed
Set Location = PointB

Create a Timer Dummy for player 1 at SomeLoc facing SomeFace
Add expiration timer with time TimeForTravel

When Timer Dummy dies Move hero to Location

Maybe this isn't what you wanted, but this way you don't have to pause your hero. :p

EDIT: Sorry it should say d = v * t, I wrote it a little quick before I got to work and realised it as I sat down in teh car... although there's no excuse for my error... I shall go spank myself, erm... twice :p

This method is really good if you are using a moving dummy, lets say your hero is gonna teleport to some place, instead of running there he can teleport with 3x his own velocity. So just set the movespeed of your dummy to hero movement speed * 3 and voila, meanwhile, you can set his movement speed to 0 and give him a dummy ability that reduces his attack speed by infinity, and maybe some nice animation for it, giving the illusion that he is channeling the spell. Make sure to give him the movement speed and attack speed back after all this. Either do that or post nr 2.... man I suck at this >.<

If you want it to not set a cooldown, simply put it to cooldown = 0, OR set the casting time to 999999 and then cancel the channel after teleportation. (just read bobo_the_kodo's interpretation of m4st4's probs)
 
Last edited:
Level 5
Joined
Jan 15, 2007
Messages
199
Set TimeForTravel = Distance between PointA and PointB * Unit Move Speed

It would sure wait a LONG LONG time till the caster teleported there.

Dummy moving at 300 ms. 500 distance.

= 150000 seconds?????

i think you meant divided by

Anyways, do you want the spells to cooldown while the caster is hidden?
If so, just use HideUnit on the caster and Show them after i moves them with triggers.

If you don't want the spells to cooldown;
Pause the unit, hide them, then unhide at the right time

Edit: Post #100 of mine ftw
 
Status
Not open for further replies.
Top