• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

time back spell

Status
Not open for further replies.
Level 7
Joined
Sep 19, 2020
Messages
190
Can maketl this time back spell? (Back 10 sec) (back gold, unit and hero death, mana, hp, position, day and night time, item, all couldowns (but not this spell) and every event back to 10 sec before)
If hero respawn in 10 sec before needs to die or hero is die needs to alive or all units
Can make this spell? Or this is very Complicated?
 
Level 19
Joined
Feb 27, 2019
Messages
590
Oh my lord... that kinda depends how complicated your map is honestly. Youd have to store a throng of values all the time. I dont know if theres an efficient or viable way to do that, but I guess its doable.

So the big question is how complicated is your map?
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,537
how about this?
When use spell after 10 sec back time to when using spell
This no need to save always variables
Just save var when spell using
do you agree?
In order to know what stats the unit had 10 seconds ago, you need to constantly save and keep track of them.

That being said, this spell already exists:
Time Lapse v1.4b

It only restores life/mana/position, as everything else is rather complex. Actually, day/night is pretty simple, I'm sure you could trigger that yourself. A unit casts Time Lapse -> Set time of day = time of day - X.
 
Last edited:
Level 9
Joined
Mar 26, 2017
Messages
376
This is a very interesting spell idea, but I don't think it is posible to make a smooth implementation, unless you put in extreme effort, and basically store information about a billion things that go on in the map. It's also quite performance intensive.

For instance:
-How are you going to handle ongoing buffs, like Avatar? It would have to be dispelled/removed from the unit, and then recast. The recast should be instantaneous, and its ongoing order has to be resumed afterwards immediately.

-Ongoing debuffs like Slow, you cannot easily obtain the remaining duration. You would have to save data on every cast instance of a timed spell like Slow, and then using that data remove the spell effect from a unit and recast it by dummy using the appropriate remaining time.

-If you restore a backup to when a unit was just about to cast a spell with a casting animation/cast time, you could reset all of its unit state and re-order it to cast the spell, but it will have to start the cast animation/cast time from scratch.

-Timers that are running at backup time need to be restarted with the appropriate remaining time. In case of periodic timers, they would have also have to be reset to their regular loop afterwards.

-Ranged unit with a very slow attack speed have a different attack cooldown from the backup state.

-How to restore ongoing missiles/projectiles from the backup state?

-How to handle UnitDamagePoint calls with a delay that fire just before the backup state?

-If your map functions use TriggerSleepAction you will need to account for this.

-Ongoing animations?


Maybe the Time Lapse spell from Dota holds solutions to how ongoing buffs/debuffs are handled, but still there will be hurdles that are incredibly hard to overcome.
 
Level 7
Joined
Sep 19, 2020
Messages
190
In order to know what stats the unit had 10 seconds ago, you need to constantly save and keep track of them.

That being said, this spell already exists:
Time Lapse v1.4b

It only restores life/mana/position, as everything else is rather complex. Actually, day/night is pretty simple, I'm sure you could trigger that yourself. A unit casts Time Lapse -> Set time of day = time of day - X.
And gold back? And item? Can set it?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,537
Gold can be implemented fairly easily but you would have to edit the Time Lapse system itself. The Item implementation would require the same treatment and be a bit more complex. Time of day could probably be done without having to edit the system.

The problem is that there's exploits and bugs that go along with these. You can give your item(s) to an ally, drop them on the ground, sell them, etc... Gold can be spent, traded to allies, etc... all of these things are easily exploited.

If you're new to the editor I don't think you should tackle anything remotely close to this level. Instead, stick with the Time Lapse spells that already exist, which use life/mana/position.
 
Last edited:
Status
Not open for further replies.
Top