• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Time Lapse

Status
Not open for further replies.
Level 22
Joined
Sep 24, 2005
Messages
4,821
Ah! you need a timer for that, and a struct. Store the unit, unit x and y coordinate, life, mana.
EDIT: sorry I wasn't thinking right, you were asking for a specific system assistance. I actually don't know how to use those.
 
Store HP and Mana into reals[array] and refresh their values e.g each 0.1 seconds (increasing index --> new value), so you can just set unit's hp to hp[current_index - current_index-50) same with mana. (50 in this case with 0.1)

But you would have to reset the index after a while that you dont hit the limit.
If you do so, it may be the case that the current index <50, so it would use an array <0 --> you have to fix this with subtract the overhang of the old index limit
 
Level 22
Joined
Sep 24, 2005
Messages
4,821
I think you'll need a list for that, and just limit your minimum number of saves and save intervals (6 saves per minute).
 
Last edited:
Level 9
Joined
Dec 12, 2007
Messages
489
assuming you already understand how to deal with timer and saving data in each interval, to apply the saving to more than one unit, you can either use (vJASS way) struct for each unit to save the value for the respective unit, or you can use (non vJASS way) hashtable to store the value for each unit. to use hashtable, you can use GetHandleId, combined with StringHash and I2S(index) to save value for each time period.

however, if you decided to use hashtable and stringhash, you might want to read this, and this too as precaution.
 
Level 16
Joined
Mar 27, 2011
Messages
1,349
Doesn't Time Lapse also revert the unit's position and buffs? The concept of the spell is to revert the unit back in time by x seconds (based on level).

So this means hp, mana, position, negative buffs, etc. Position sounds the same as hp in terms of difficulty. How do you record buffs? Maybe you shouldn't worry about that?
 
Level 9
Joined
Dec 12, 2007
Messages
489
Doesn't Time Lapse also revert the unit's position and buffs? The concept of the spell is to revert the unit back in time by x seconds (based on level).

So this means hp, mana, position, negative buffs, etc. Position sounds the same as hp in terms of difficulty. How do you record buffs? Maybe you shouldn't worry about that?

refer to the playdota hero page for detail, it removes negative buffs only, positive buff is kept, and no buff is restored if previously affected.
 
Why you need this for ALL units?
To me, something non-MUI is unacceptable. And I just think that DotA didn't do it non-MUI.
assuming you already understand how to deal with timer and saving data in each interval, to apply the saving to more than one unit, you can either use (vJASS way) struct for each unit to save the value for the respective unit, or you can use (non vJASS way) hashtable to store the value for each unit. to use hashtable, you can use GetHandleId, combined with StringHash and I2S(index) to save value for each time period.

however, if you decided to use hashtable and stringhash, you might want to read this, and this too as precaution.
I guess I'll stay with hashtables.

Thank you for the replies.
 
Level 19
Joined
Aug 8, 2007
Messages
2,765

Yes.

MPI stands for Multi Player Instanceability. MUI stands for Multi Unit Instanceability. The difference is its one per player for MPI, one per every unit in MUI. Generally, MPI is alot faster because it doesn't allow indexing, people complain when DotA lags so they have to keep the lag to a minimum so they only do MPI per player for every hero.
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
I was asking if things like Sunstrike were MPI.

But how about Tornado? It's a line damage and cyclones enemies hit. And last time I tried it with WTF, it worked with multiple casts. I think it's triggered.

something can be MPI and multicastable :p

idk wtf sunstrike is
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
Hashtables can do a time lapsed, by saving life ( Life of DesiredUnit ), saving mana ( Mana of Unit ), and of course by saving unit position. And Store the unit in to the group and make a duration of the warp execution, decrease it in a loop, then Make an ITE Condition if duration <= or less than 0.00, after that Load a saved location then move a unit to that location, load a saved life and mana of a triggering unit then use that in SetWidgetLife or SetLife of triggering unit to ( ... ). Done!.
 
Level 9
Joined
Dec 12, 2007
Messages
489
if you look into the released script provided in playdota site, you can tell all skills is made to be MUI or MPI at least.

I don't see why posts above need to argue about Dota's spells being MUI/MPI/whatever, if you can and want make it MUI/better then do so, no need to do it just because Dota do it like that too.
 
Status
Not open for further replies.
Top