HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Is there a revive hero instantly bug?

05-06-2007, 09:20 AM#1
Bloodlust
Hello.
Is the Revive Hero (instantly) at position thingy buggy? So far it works fine for my player heroes, however the NPC Heroes make trouble:
I use 3 NPC Heroes, after they die, they respawn after some time to run out and die again. When they die, they pick a random location from 3 possible.

Sometimes they just dont revive. I stripped the trigger down to "if unit dies, revive at position x". And really, everything works else works in the trigger - conditions and so on are fine. The worst is, sometimes it worked fine... for a few minutes into the game, then it bugged. Sometimes one of 3 spawnlocations worked and the other 2 didnt... Im lost.

Any ideas? I will waste now some more hours deactivating any other triggers again and again..
05-06-2007, 10:46 AM#2
Pyrogasm
Are you, by chance, destroying a trigger at any point in the game? Sometimes destroying a trigger can be a very messy and screwey thing.
05-06-2007, 11:21 AM#3
Bloodlust
No. :[
05-06-2007, 01:18 PM#4
zen87
let me guess, did u put a wait in the trigger and used the GetDyingUnit() callback ?
05-06-2007, 02:15 PM#5
Rising_Dusk
Post the trigger please.
It is likely a user error, the code behind it (When properly used) works wonderfully.
05-06-2007, 04:15 PM#6
Bloodlust
The trigger can be reduced to

if unit dies =>
Hero - Instantly revive "Hero" at (Center of "Region" <gen>), Show revival graphics

and it still doesnt work. Thats why I didnt post it. I will try to remove all other triggers and see if it works, then add em back it one by one. I did this already once when I thought I had the bug tracked down, but .... :[ Takes quite some time.
It works sometimes for some minutes, that fooled me.

The important part: Everything else in the trigger works anyway. I even get the message where what hero should respawn... but he isnt revived.


Quote:
Originally Posted by zen87
let me guess, did u put a wait in the trigger and used the GetDyingUnit() callback ?

Early on, but right now I do not. Atm its not working with periodic 90 sec event (unit variable to pick hero) and without any waits in there.
05-07-2007, 08:06 PM#7
Bloodlust
for the record..

I *think* that I fixed it finally. I deleted all triggers group by group and tested the map up to 20 minutes each time until I was sure the bug didnt exist or he bugged the respawn.. well the group that bugged it, was my trigger that spawned units for the computer (on certain times up to ~50 at once). With those triggers deactivated it worked fine. Then I had an idea and checked all the units.. and well, they still had a food cost. So I removed the food cost of all units and started the map again with all triggers working... didnt bug.

I didnt know that food could screw the instant revive action.
05-07-2007, 08:18 PM#8
Anitarf
Maybe you went over the max food limit. I'm pretty sure the revive function doesn't bug if it would only go over the current food limit.
05-07-2007, 08:32 PM#9
Bloodlust
Pretty much. Some spawns were 100+ food cost and triple that amount was running around easily..

Hell, just gave it a try and spawned some 50 food units.. bugged half of my triggers.. nice coding there blizzard.