Hi!
I'm trying to make a global spell which will rewind time. The idea is that you use the spell and all units in the map will be moved to their position they were in 15 or so seconds ago. Their health and mana will also be set back to whatever they had at that point. Those are just the basics though, I was thinking of adding things like hero experience and gold in the mine (let's not talk about getting it to work with destructibles!!)
Anyway I've been trying and trying to get it to work but I've completely confused myself and honestly have no idea how to get it to work anymore.
Here is the trigger I had put together that would record stats and positions of units across the battlefield. Any help would be awesome as this could be one really cool spell to add somewhere!!!
P.S. I did have a trigger for activating the spell but I got confused and now it's long gone.
I'm trying to make a global spell which will rewind time. The idea is that you use the spell and all units in the map will be moved to their position they were in 15 or so seconds ago. Their health and mana will also be set back to whatever they had at that point. Those are just the basics though, I was thinking of adding things like hero experience and gold in the mine (let's not talk about getting it to work with destructibles!!)
Anyway I've been trying and trying to get it to work but I've completely confused myself and honestly have no idea how to get it to work anymore.
Here is the trigger I had put together that would record stats and positions of units across the battlefield. Any help would be awesome as this could be one really cool spell to add somewhere!!!
P.S. I did have a trigger for activating the spell but I got confused and now it's long gone.
-
Time Spell 2 Part 1
-
Events
- Time - Every 0.50 seconds of game time
-
Conditions
- Time2Count Less than 30
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Time2Count Less than 30
-
Then - Actions
- Set Time2Count = (Time2Count + 1)
-
Else - Actions
- Set Time2Count = 1
-
If - Conditions
- Set TempInt = 0
-
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
-
Loop - Actions
- Set TempInt = (TempInt + 1)
- Set Time2SavedUnit[Time2Count] = TempInt
- Set Time2HP[Time2SavedUnit[Time2Count]] = (Life of (Picked unit))
- Set Time2MP[Time2SavedUnit[Time2Count]] = (Mana of (Picked unit))
- Set Time2Point[Time2SavedUnit[Time2Count]] = (Position of (Picked unit))
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events