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

Spell Question

Status
Not open for further replies.
Level 33
Joined
Mar 27, 2008
Messages
8,035
You have to update each X second the unit's movement/actions/etc every interval, the smaller the interval, the more sensitive your spell/system will be (0.01 ~ 0.03) is more effective than tracking the unit once a second.

You know, in 1 second, anything could happen.


Do you wish to imitate the Nerubian Weaver's Ultimate, Time Lapse ? (if you know DotA...)

Well, a 1-second works the same. I just confused with another method lol.
 
Level 8
Joined
Sep 7, 2008
Messages
320
You have to update each X second the unit's movement/actions/etc every interval, the smaller the interval, the more sensitive your spell/system will be (0.01 ~ 0.03) is more effective than tracking the unit once a second.

You know, in 1 second, anything could happen.


Do you wish to imitate the Nerubian Weaver's Ultimate, Time Lapse ? (if you know DotA...)

Well, a 1-second works the same. I just confused with another method lol.

Not same if you use GUI version.
There is not different when you cast spell at 0.1 seconds or 0.9 seconds. In both situation you will be back at 6th seconds. Even at those time, you got different location, you still will back to the location of 0 second.
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
As I said, I was confused with another method, that is kinda similar to this but not same at all.

What I talk about was keeping track of the unit's HP/MP per small interval seconds will make your spell more sensitive because in 1 second, anything can happen.
Which is totally not related to this thread at all.
 
Every X time (something between 0.1 and 0.5 seconds seems the best imo), you save things in variables/hashtables. Let's say we make it 6seconds as you said, with a 0.5 periodic, you'll have 6/0,5 (12). So, you use only 12arrays/hashtable emplacments/variables. Every 0.5 seconds, for the values stored from 11 to 1, you save values to the next array/hashtable emplacment/variable (actual one + 1), and you save the actual ones at the array 1.
When your unit casts the spell, you give it the values saved in 12.

Also, for the unit's location, better to use coordonnates to avoid leaks.
 
Status
Not open for further replies.
Top