| 05-22-2004, 03:27 AM | #1 |
Hey... on a rare occasion, a hero doesnt revive in my map. The countdown stops at 00:00:00 and the hero never revives. Is there any known bug about this...? Ive looked over the trigger(below) and found nothing that would make it mess up, to my knowledge. Can anyone share some knowledge on this, please? The trigger: Code:
Hero Revive
Events
Unit - A unit Dies
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
(((Dying unit) is A Hero) Equal to True) and ((((Dying unit) is a Human) Equal to True) and ((Unit-type of (Dying unit)) Not equal to Unholy Master Dummy Unit))
(Unit-type of (Dying unit)) Not equal to Gravemaster dummy
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
(Unit-type of (Dying unit)) Equal to Gravemaster
(Level of Unholy Spasm for (Dying unit)) Greater than 0
Then - Actions
Wait 4.00 game-time seconds
Else - Actions
Do nothing
Game - Display to (All players) the text: (Name[(Player number of (Owner of (Dying unit)))] + ('s hero has been killed and will be revived in + ((String(((Hero level of (Dying unit)) x 3))) + seconds.)))
Set Revive[(Player number of (Owner of (Dying unit)))] = (Real(((Hero level of (Dying unit)) x 3)))
Countdown Timer - Start (Create a timer that is One-shot, of duration ((Real((Hero level of (Dying unit)))) x 3.00)) as a One-shot timer that will expire in ((Real((Hero level of (Dying unit)))) x 3.00) seconds
Countdown Timer - Create a timer window for (Last started timer) with title ((Name of (Dying unit)) + revives in:)
Set Revivetimerwindow[(Player number of (Owner of (Dying unit)))] = (Last created timer window)
Wait Revive[(Player number of (Owner of (Dying unit)))] game-time seconds
Countdown Timer - Destroy Revivetimerwindow[(Player number of (Owner of (Dying unit)))]
Set TempPoint2 = (Center of Human Hero Revive <gen>)
Hero - Instantly revive (Dying unit) at TempPoint2, Show revival graphics
Camera - Pan camera for (Owner of (Dying unit)) to TempPoint2 over 1.00 seconds
Point - Remove TempPoint2
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
(((Dying unit) is A Hero) Equal to True) and ((((Dying unit) is a Undead) Equal to True) and ((Unit-type of (Dying unit)) Not equal to Unholy Master Dummy Unit))
(Unit-type of (Dying unit)) Not equal to Gravemaster dummy
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
(Unit-type of (Dying unit)) Equal to Gravemaster
(Level of Unholy Spasm for (Dying unit)) Greater than 0
Then - Actions
Wait 4.00 game-time seconds
Else - Actions
Do nothing
Game - Display to (All players) the text: (Name[(Player number of (Owner of (Dying unit)))] + ('s hero has been killed and will be revived in + ((String(((Hero level of (Dying unit)) x 3))) + seconds.)))
Set Revive[(Player number of (Owner of (Dying unit)))] = (Real(((Hero level of (Dying unit)) x 3)))
Countdown Timer - Start (Create a timer that is One-shot, of duration ((Real((Hero level of (Dying unit)))) x 3.00)) as a One-shot timer that will expire in ((Real((Hero level of (Dying unit)))) x 3.00) seconds
Countdown Timer - Create a timer window for (Last started timer) with title ((Name of (Dying unit)) + revives in:)
Set Revivetimerwindow[(Player number of (Owner of (Dying unit)))] = (Last created timer window)
Wait Revive[(Player number of (Owner of (Dying unit)))] game-time seconds
Countdown Timer - Destroy Revivetimerwindow[(Player number of (Owner of (Dying unit)))]
Set TempPoint2 = (Center of Undead Hero Revive <gen>)
Hero - Instantly revive (Dying unit) at TempPoint2, Show revival graphics
Camera - Pan camera for (Owner of (Dying unit)) to TempPoint2 over 1.00 seconds
Point - Remove TempPoint2
Else - Actions
Do nothing |
| 05-22-2004, 11:46 AM | #2 |
Code:
Lets make a reviver trigger
Events
Unit - A unit Dies
Conditions
((Dying unit) is A Hero) Equal to True
Actions
Custom script: local timer t=udg_Timers[GetConvertedPlayerId(GetOwningPlayer(GetDyingUnit( )))]
Countdown Timer - Create a timer window for Timers[(Player number of (Owner of (Dying unit)))] with title ((Proper name of (Dying unit)) + will revive in)
Set TimerWindows[(Player number of (Owner of (Dying unit)))] = (Last created timer window)
Custom script: call TimerStart(t,10,false,function Revive)
Unit Group - Pick every unit in (Last created unit group) and do (Actions)
Loop - Actions
Custom script: endfunction
Custom script: function Revive takes nothing returns nothing
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
Custom script: if(GetExpiredTimer()==udg_Timers[ bj_forLoopAIndex])then
Hero - Instantly revive Heroes[(Integer A)] at (Center of (Playable map area)), Hide revival graphics
Countdown Timer - Destroy TimerWindows[(Integer A)]
Custom script: endifMy guess is that your variables are being overwridden when you use the wait. Try this revive trigger that I wrote you'll have to change some stuff ofcourse but it should work perfectly. Also your If then else statements are screwy in the first outter if you check if hes not a gravemaster dummy, but if he is then you want him to revive but if he isn't it does nothing. |
| 05-22-2004, 07:27 PM | #3 |
Hmm. I dont know how the variables would be overwritten because each player has only 1 hero and those variables arent used in any other trigger. The gravemaster if/then is for a skill that goes on for 4 seconds after his death, so I wanted it to wait 4 seconds before starting the revive timer. Anyway, you're probably right. I'll try out your trigger and see if it fixes the problem. Thanks. |
| 05-24-2004, 12:40 AM | #4 |
I have encountered heroes not reviving for inexplicable reasons, especially when the revive hero trigger is being used a fair bit. What I did to get around it was transferring the dead hero to another player (like neutral passive), reviving the hero, and transferring it back. This worked a charm to solve the problem for me, so I'm pretty sure there is some kind of odd bug that causes heroes to sometimes not revive by trigger. |
| 05-24-2004, 03:04 AM | #5 |
How is this...? Code:
Hero Revive
Events
Unit - A unit Dies
Conditions
And - All (Conditions) are true
Conditions
(Unit-type of (Dying unit)) Not equal to Unholy Master Dummy Unit
(Unit-type of (Dying unit)) Not equal to Gravemaster dummy
((Dying unit) is A Hero) Equal to True
Actions
Custom script: local timer t=udg_Timers[GetConvertedPlayerId(GetOwningPlayer(GetDyingUnit( )))]
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
And - All (Conditions) are true
Conditions
(Unit-type of (Dying unit)) Equal to Gravemaster
(Level of Unholy Spasm for (Dying unit)) Greater than 0
Then - Actions
Wait 4.00 game-time seconds
Else - Actions
Countdown Timer - Create a timer window for Timers[(Player number of (Owner of (Dying unit)))] with title ((Name of (Dying unit)) + will revive in)
Set TimerWindows[(Player number of (Owner of (Dying unit)))] = (Last created timer window)
Game - Display to (All players) the text: (Name[(Player number of (Owner of (Dying unit)))] + ('s hero has been killed and will be revived in + ((String(((Hero level of (Dying unit)) x 3))) + seconds.)))
Custom script: call TimerStart(t,( I2R(GetHeroLevel(GetDyingUnit())) * 3.00 ),false,function Revive)
Unit - Change ownership of PlayerHero[(Player number of (Owner of (Dying unit)))] to Neutral Passive and Retain color
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Last created unit group) and do (Actions)
Loop - Actions
Custom script: endfunction
Custom script: function Revive takes nothing returns nothing
For each (Integer ReviveTriggerInteger) from 1 to 5, do (Actions)
Loop - Actions
Custom script: if(GetExpiredTimer()==udg_Timers[ udg_ReviveTriggerInteger])then
Set TempPoint = (Center of Human Hero Revive <gen>)
Hero - Instantly revive PlayerHero[ReviveTriggerInteger] at TempPoint, Hide revival graphics
Unit - Change ownership of PlayerHero[ReviveTriggerInteger] to (Player(ReviveTriggerInteger)) and Retain color
Camera - Pan camera for (Player(ReviveTriggerInteger)) to TempPoint over 1.00 seconds
Point - Remove TempPoint
Countdown Timer - Destroy TimerWindows[ReviveTriggerInteger]
Custom script: endif
For each (Integer ReviveTriggerInteger) from 6 to 10, do (Actions)
Loop - Actions
Custom script: if(GetExpiredTimer()==udg_Timers[ udg_ReviveTriggerInteger])then
Set TempPoint = (Center of Undead Hero Revive <gen>)
Hero - Instantly revive PlayerHero[ReviveTriggerInteger] at TempPoint, Hide revival graphics
Unit - Change ownership of PlayerHero[ReviveTriggerInteger] to (Player(ReviveTriggerInteger)) and Retain color
Camera - Pan camera for (Player(ReviveTriggerInteger)) to TempPoint over 1.00 seconds
Point - Remove TempPoint
Countdown Timer - Destroy TimerWindows[ReviveTriggerInteger]
Custom script: endif |
| 05-25-2004, 02:00 AM | #6 |
Dangit. With the above trigger, heroes revived and it worked fine... then one hero died and didnt have a timer or anything. Never revived. :o What is wrong here? |
| 05-25-2004, 07:20 PM | #7 |
I think the WE unlimited has a instant revive action.... |
| 05-25-2004, 10:24 PM | #8 |
Every editor has the Hero - revive Hero instantly action... I already use it. The trigger is the problem here... |
