| 10-29-2005, 05:16 AM | #1 |
I was thinking about it, and I haven't come up with any solutions. The ability I want to make is basically the one that the nerubian weaver uses in DOTA where he goes back 5 seconds in time, reverting to the position, health and mana he had at the time. Can anyone see how this could be done in GUI? I'm not going to learn JASS, it's too difficult for my easily-confused brain. |
| 10-29-2005, 05:55 AM | #2 |
It doesn't seem like I can post maps so I'll try my best to explain it. 1. Make a dummy ability (Channel) and give it to a unit. 2. Try to recreate these triggers I'm posting. Code:
Saving
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Set Temp = (Temp + 1)
Set Point[Temp] = (Position of Chaplain 0001 <gen>)
Set Life[Temp] = (Life of Chaplain 0001 <gen>)
Set Mana[Temp] = (Mana of Chaplain 0001 <gen>)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Temp Equal to 30
Then - Actions
For each (Integer A) from 1 to 15, do (Actions)
Loop - Actions
Set Point[(Integer A)] = Point[(15 + (Integer A))]
Set Life[(Integer A)] = Life[(15 + (Integer A))]
Set Mana[(Integer A)] = Mana[(15 + (Integer A))]
Else - ActionsCode:
Ability
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Time Flash
Actions
Set Temp2 = ((Level of Time Flash for Chaplain 0001 <gen>) x 5)
Set Temp2 = (Temp - Temp2)
Unit - Move Chaplain 0001 <gen> instantly to Point[Temp2]
Unit - Set life of Chaplain 0001 <gen> to Life[Temp2]
Unit - Set mana of Chaplain 0001 <gen> to Mana[Temp2]
Set Temp = 03. Your done. Hope it works. For that matter I didn't test this so I don't know if it works. lol |
| 10-29-2005, 07:10 AM | #3 |
Alrighty, i get it all except for the whole "For each integer A from 1 to 15, do actions" bit. I get what that type of trigger does and all, just not what its use is in this trigger. P.S. I told you I was easily confused! |
| 10-29-2005, 09:31 AM | #4 |
The trigger has to store the data for at least the last 15 seconds. So, when it gets to 30 seconds, it takes the last 15 seconds and writes them over the previous 15 seconds. But you forgot to reset the Temp variable to 15, and you don't fix the memory leak. Also, naming a variable temp usually implies it's a temporary variable that you can use anywhere, but in this case, Temp is used all the time by this trigger and shouldn't be overwritten by others, so renaming it would be wise. So here's how the last part of that trigger should look like: Code:
Then - Actions
For each (Integer A) from 1 to 15, do (Actions)
Loop - Actions
Custom script: call RemoveLocation( udg_Point[GetForLoopIndexA()] )
Set Point[(Integer A)] = Point[(15 + (Integer A))]
Set Life[(Integer A)] = Life[(15 + (Integer A))]
Set Mana[(Integer A)] = Mana[(15 + (Integer A))]
Set Temp = 15 |
| 10-29-2005, 08:59 PM | #5 | |
Quote:
What did you expect? It was 1:30am at night and I did say I didn't test it or anything. |
| 10-30-2005, 12:10 AM | #6 |
This isn't working... the person casting it just does the cast animation without any other results... I don't think I'm really up to figuring out how to fix it. Any other suggestions? Edit: Ok what the hell. I found out what's wrong with it and it's damned strange. The periodic event trigger (which runs every second) isn't running. period. I tried testing it with a bunch of things like playing a sound every time the trigger runs, and none of them worked. I'm using WEU, could this be why it isn't working? |
| 10-30-2005, 03:53 AM | #7 | |
Quote:
Try copying the triggers to a fresh map and see what happens. |
