• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] revive sistem stop working ingame

Status
Not open for further replies.
Level 3
Joined
Feb 26, 2013
Messages
20
My hero revive system works for a while but after some time and revives it stops reviving can any 1 help me know what the problem is?
  • revive
    • Events
      • Unit - A unit Becomes revivable
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Triggering unit)) Equal to Fighter
          • (Unit-type of (Triggering unit)) Equal to Berzerker
          • (Unit-type of (Triggering unit)) Equal to Destroyer
          • (Unit-type of (Triggering unit)) Equal to Warlord
          • (Unit-type of (Triggering unit)) Equal to Warrior
          • (Unit-type of (Triggering unit)) Equal to Scout
          • (Unit-type of (Triggering unit)) Equal to Trickster
          • (Unit-type of (Triggering unit)) Equal to Mage
          • (Unit-type of (Triggering unit)) Equal to Soul Breaker
          • (Unit-type of (Triggering unit)) Equal to Summoner
          • (Unit-type of (Triggering unit)) Equal to Wizard
          • (Unit-type of (Triggering unit)) Equal to Healer
          • (Unit-type of (Triggering unit)) Equal to knight
          • (Unit-type of (Triggering unit)) Equal to Rogue
          • (Unit-type of (Triggering unit)) Equal to Ranger
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 1 (Red)
        • Then - Actions
          • Hero - Instantly revive (Triggering unit) at redrevive, Show revival graphics
          • Camera - Pan camera for Player 1 (Red) to redrevive over 0.00 seconds
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 2 (Blue)
        • Then - Actions
          • Hero - Instantly revive (Triggering unit) at bluerevive, Show revival graphics
          • Camera - Pan camera for Player 2 (Blue) to bluerevive over 0.00 seconds
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 3 (Teal)
        • Then - Actions
          • Hero - Instantly revive (Triggering unit) at tealrevive, Show revival graphics
          • Camera - Pan camera for Player 3 (Teal) to tealrevive over 0.00 seconds
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 4 (Purple)
        • Then - Actions
          • Hero - Instantly revive (Triggering unit) at purplerevive, Show revival graphics
          • Camera - Pan camera for Player 4 (Purple) to purplerevive over 0.00 seconds
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 5 (Yellow)
        • Then - Actions
          • Hero - Instantly revive (Triggering unit) at yellowrevive, Show revival graphics
          • Camera - Pan camera for Player 5 (Yellow) to yellowrevive over 0.00 seconds
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 6 (Orange)
        • Then - Actions
          • Hero - Instantly revive (Triggering unit) at orangerevive, Show revival graphics
          • Camera - Pan camera for Player 6 (Orange) to orangerevive over 0.00 seconds
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 7 (Green)
        • Then - Actions
          • Hero - Instantly revive (Triggering unit) at greenrevive, Show revival graphics
          • Camera - Pan camera for Player 7 (Green) to greenrevive over 0.00 seconds
        • Else - Actions
  • set 1
    • Events
      • Unit - A unit enters Region 004 <gen>
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 1 (Red)
        • Then - Actions
          • Set redrevive = (Center of Region 004 <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 2 (Blue)
        • Then - Actions
          • Set bluerevive = (Center of Region 004 <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 3 (Teal)
        • Then - Actions
          • Set tealrevive = (Center of Region 004 <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 4 (Purple)
        • Then - Actions
          • Set purplerevive = (Center of Region 004 <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 5 (Yellow)
        • Then - Actions
          • Set yellowrevive = (Center of Region 004 <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 6 (Orange)
        • Then - Actions
          • Set orangerevive = (Center of Region 004 <gen>)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Triggering unit)) Equal to Player 7 (Green)
        • Then - Actions
          • Set greenrevive = (Center of Region 004 <gen>)
        • Else - Actions
trigger 1 is suposed to save the revival point and trigger 2 is suposed to revive the hero when it becomes revivable, but somehow it stops reviving.
i have many "set" regions
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
I don't really see anything wrong, except that your trigger could be optimized and that your points leak. You should use the custom script
  • Custom script: call RemoveLocation(udg_NameOfYourPoint)
  • Custom script: set udg_NameOfYourPoint = null
to remove leaks when that unit gets revived.
Also, how does your "Set 1" trigger fire? Does it fire every time your hero gets revived?
 
Level 3
Joined
Feb 26, 2013
Messages
20
y r u setting the same point for multiple respawn points ? they are all center of regions 004 ?

that is just 1 respawn point and is adding the respawn point if a unit belonging to a player enters the region, so if you enter 1 town you will start reviving there and if you enter a different town you will change your revival point to the new town

can the leaks make it stop working?
 
Last edited by a moderator:
Level 28
Joined
Jan 26, 2007
Messages
4,789
is there any better way of doing this then?
Yes, with arrays.

ReviveLoc[X] would be the revive location for Player X (e.g.: ReviveLoc[3] is the revive location for Teal).
Then you wouldn't need any ITE at all, just this:

  • Set ReviveLoc[Player number of (Triggering Player)] = (Center of Region 004 <gen>)
and

  • Hero - Instantly revive (Triggering unit) at ReviveLoc[Player number of (Triggering Player)], Show revival graphics
  • Camera - Pan camera for (Triggering Player) to ReviveLoc[Player number of (Triggering Player)] over 0.00 seconds
The entire list of ITE's can be replaced with those actions (and nothing more).

Also, are you sure you need those Or-conditions in the first trigger? Are there other heroes that might get revived if you don't add it, and wouldn't "Player number less than 8" not be sufficient as condition?
 
Level 3
Joined
Feb 26, 2013
Messages
20
Yes, with arrays.

ReviveLoc[X] would be the revive location for Player X (e.g.: ReviveLoc[3] is the revive location for Teal).
Then you wouldn't need any ITE at all, just this:

  • Set ReviveLoc[Player number of (Triggering Player)] = (Center of Region 004 <gen>)
  • Hero - Instantly revive (Triggering unit) at ReviveLoc[Player number of (Triggering Player)], Show revival graphics
  • Camera - Pan camera for (Triggering Player) to ReviveLoc[Player number of (Triggering Player)] over 0.00 seconds
The entire list of ITE's can be replaced with those actions (and nothing more).

that seems ok ill try testing it in my triggers

Also, are you sure you need those Or-conditions in the first trigger? Are there other heroes that might get revived if you don't add it, and wouldn't "Player number less than 8" not be sufficient as condition?

there is a summoner that summons heros that scales out of his stats, also there are bosses that are heros
 

Wrda

Spell Reviewer
Level 28
Joined
Nov 18, 2012
Messages
1,994
Yes, with arrays.

ReviveLoc[X] would be the revive location for Player X (e.g.: ReviveLoc[3] is the revive location for Teal).
Then you wouldn't need any ITE at all, just this:

  • Set ReviveLoc[Player number of (Triggering Player)] = (Center of Region 004 <gen>)
and

  • Hero - Instantly revive (Triggering unit) at ReviveLoc[Player number of (Triggering Player)], Show revival graphics
  • Camera - Pan camera for (Triggering Player) to ReviveLoc[Player number of (Triggering Player)] over 0.00 seconds
The entire list of ITE's can be replaced with those actions (and nothing more).
So you're saying that with that method it won't cause desyncs?
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
So you're saying that with that method it won't cause desyncs?
Desyncs cannot be caused by just globally setting variable / creating units / panning camera's (the normal ones), so yeah.
While camera pan does use GetLocalPlayer (by default), it does so in a safe way.

You may have confused it with "Pan Camera as Necessary" (or something), which will always create a leak and sets a variable inside a LocalPlayer-block (less safe).
Never use that action, it's not needed anyway.

there is a summoner that summons heros that scales out of his stats, also there are bosses that are heros
Okay. (The bosses probably could've been solved by using a player-filter, but summoning heroes does complicate it).
Not a problem, you can keep it that way :).
 
Last edited:
Status
Not open for further replies.
Top