Hero Revival Location Bug

bookyjoo

New Member
Reaction score
1
http://world-editor-tutorials.thehelper.net/revive.php

I copied this exactly for my hero revival trigger. However I didn't want the heroes to revive at the center of the map, so I changed the revival line accordingly to this:

custom script: call ReviveHeroLoc(OURHERO, GetPlayerStartLocationLoc(GetOwningPlayer(OURHERO)),true)

That is the only line I changed as it says in the tutorial. Now, in testing heroes were reviving in opponents start locations instead of their own. Only when I test on single player custom map does it work consistently.... The tutorial states that this should work with multiple heroes since it uses local variables. What's wrong???
 

bookyjoo

New Member
Reaction score
1
Revive Hero
Events
Unit - A unit Dies
Conditions
((Triggering unit) is A Hero) Equal to True
Actions
Custom script: local timerdialog WINDOW
Custom script: local integer HEROWAIT
Custom script: local timer OURTIMER
Custom script: local unit OURHERO
Custom script: set OURHERO = GetDyingUnit()
Custom script: set HEROWAIT = (GetHeroLevel(OURHERO) * 5)
Custom script: set OURTIMER = CreateTimer()
Custom script: call StartTimerBJ( OURTIMER, false, ( I2R(HEROWAIT) ))
Custom script: call CreateTimerDialogBJ( OURTIMER, GetPlayerName(GetOwningPlayer(OURHERO)))
Custom script: set WINDOW = GetLastCreatedTimerDialogBJ()
Custom script: call TimerDialogDisplayForPlayerBJ(true, WINDOW, GetOwningPlayer(OURHERO))
Custom script: call PolledWait (HEROWAIT)
Custom script: call ReviveHeroLoc(OURHERO, GetPlayerStartLocationLoc(GetOwningPlayer(OURHERO)), true)
Custom script: call PanCameraToTimedLocForPlayer(GetOwningPlayer(OURHERO), GetUnitLoc(OURHERO), 0.60)
Custom script: call DestroyTimerDialog(WINDOW)
 

bookyjoo

New Member
Reaction score
1
yeah its just the reviveheroloc line that messes it up. Works perfectly spawning at a single designated location.... Oh here's another thing that I noticed. When I was testing it with others, the camera panned to the enemy start location at initialization and I kept reviving there.... Its almost as if the trigger actually messes up your start location. What the flip?
 

Tom Jones

N/A
Reaction score
437
How did you test?
Kinda makes me think that you haven't made all players either user or computer.
 

bookyjoo

New Member
Reaction score
1
I tested on battlenet with 10 players..... slots 11 and 12 aren't controlled by anyone. They are basically for spawning allied creeps. They aren't computer controlled..... but they also don't use heroes at all, so i'm unsure of how that would effect the hero revive.
 

bookyjoo

New Member
Reaction score
1
Nobody seems to know... How about the fact that the trigger seems to have caused a change in the starting location. Because on initialization the camera will pan to the wrong starting location.... even before any killing happens.... i'll keep testing and try to help pinpoint the problem... but if anyone thinks of anything... i'm thinking it might be something simple
 

bookyjoo

New Member
Reaction score
1
here it is.... triggers aren't very organized cuz this is my first map. The trigger that does hero revival is under miscellaneous trigger folder. Thanks for the help.
 

Attachments

  • Transformers_alpha.w3x
    91.4 KB · Views: 70

bookyjoo

New Member
Reaction score
1
OK... So after more testing 5v5 on battlenet. It didn't bug when I was player 1(red).... but it bugged when I was on the opposite team. Everyone's start location was messed up. I think the problem has something to do with the player start location messing up if the host is NOT red or player 1 or whatever... I don't think it has to do with the trigger itself. So how would i fix this problem, if this is indeed the problem???
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top