• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Hero Revival Problems

Status
Not open for further replies.
Level 4
Joined
Aug 14, 2007
Messages
66
I finished converting my map from WEU to normal WE and now im spending twice as much time getting things to work again :bored:

Before, when heroes died they would revive at a location they set in game. Now heroes do not revive and the camera just pans to what I assume is the center of playable map area.

  • Set Revive Location
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • ((Buying unit) is A Hero) Equal to True
          • (Item-type of (Sold Item)) Equal to Set Revive Location
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Selling unit) Equal to Soul Keeper 0118 <gen>
        • Then - Actions
          • Set TempPoint_2 = (Position of (Buying unit))
          • Special Effect - Create a special effect at TempPoint_2 using Abilities\Spells\Demon\ReviveDemon\ReviveDemon.mdl
          • Set TempSpecEffect = (Last created special effect)
          • Custom script: call RemoveLocation(udg_TempPoint_2)
          • Set TempPoint_2 = (Center of Start <gen>)
          • Set PlayerRevivePoint[(Custom value of (Buying unit))] = TempPoint_2
          • Wait 0.00 seconds
          • Custom script: call RemoveLocation(udg_TempPoint_2)
          • Game - Display to (All players matching ((Owner of (Buying unit)) Equal to (Matching player))) for 5.00 seconds the text: Your revive locatio...
          • Wait 2.00 seconds
          • Special Effect - Destroy TempSpecEffect
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Selling unit) Equal to Soul Keeper 0049 <gen>
        • Then - Actions
          • Set TempPoint_2 = (Position of (Buying unit))
          • Special Effect - Create a special effect at TempPoint_2 using Abilities\Spells\Demon\ReviveDemon\ReviveDemon.mdl
          • Set TempSpecEffect = (Last created special effect)
          • Custom script: call RemoveLocation(udg_TempPoint_2)
          • Set TempPoint_2 = (Center of Seesyde City Revive <gen>)
          • Set PlayerRevivePoint[(Custom value of (Buying unit))] = TempPoint_2
          • Wait 0.00 seconds
          • Custom script: call RemoveLocation(udg_TempPoint_2)
          • Game - Display to (All players matching ((Owner of (Buying unit)) Equal to (Matching player))) for 5.00 seconds the text: Your revive locatio...
          • Wait 2.00 seconds
          • Special Effect - Destroy TempSpecEffect
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Selling unit) Equal to Soul Keeper 0082 <gen>
        • Then - Actions
          • Set TempPoint_2 = (Position of (Buying unit))
          • Special Effect - Create a special effect at TempPoint_2 using Abilities\Spells\Demon\ReviveDemon\ReviveDemon.mdl
          • Set TempSpecEffect = (Last created special effect)
          • Custom script: call RemoveLocation(udg_TempPoint_2)
          • Set TempPoint_2 = (Center of The Oasis Revive <gen>)
          • Set PlayerRevivePoint[(Custom value of (Buying unit))] = TempPoint_2
          • Wait 0.00 seconds
          • Custom script: call RemoveLocation(udg_TempPoint_2)
          • Game - Display to (All players matching ((Owner of (Buying unit)) Equal to (Matching player))) for 5.00 seconds the text: Your revive locatio...
          • Wait 2.00 seconds
          • Special Effect - Destroy TempSpecEffect
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Selling unit) Equal to Soul Keeper 0165 <gen>
        • Then - Actions
          • Set TempPoint_2 = (Position of (Buying unit))
          • Special Effect - Create a special effect at TempPoint_2 using Abilities\Spells\Demon\ReviveDemon\ReviveDemon.mdl
          • Set TempSpecEffect = (Last created special effect)
          • Custom script: call RemoveLocation(udg_TempPoint_2)
          • Set TempPoint_2 = (Center of Frost Talon Peak Revive <gen>)
          • Set PlayerRevivePoint[(Custom value of (Buying unit))] = TempPoint_2
          • Wait 0.00 seconds
          • Custom script: call RemoveLocation(udg_TempPoint_2)
          • Game - Display to (All players matching ((Owner of (Buying unit)) Equal to (Matching player))) for 5.00 seconds the text: Your revive locatio...
          • Wait 2.00 seconds
          • Special Effect - Destroy TempSpecEffect
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Selling unit) Equal to Soul Keeper 0384 <gen>
        • Then - Actions
          • Set TempPoint_2 = (Position of (Buying unit))
          • Special Effect - Create a special effect at TempPoint_2 using Abilities\Spells\Demon\ReviveDemon\ReviveDemon.mdl
          • Set TempSpecEffect = (Last created special effect)
          • Custom script: call RemoveLocation(udg_TempPoint_2)
          • Set TempPoint_2 = (Center of Snowcap Village Revive <gen>)
          • Set PlayerRevivePoint[(Custom value of (Buying unit))] = TempPoint_2
          • Wait 0.00 seconds
          • Custom script: call RemoveLocation(udg_TempPoint_2)
          • Game - Display to (All players matching ((Owner of (Buying unit)) Equal to (Matching player))) for 5.00 seconds the text: Your revive locatio...
          • Wait 2.00 seconds
          • Special Effect - Destroy TempSpecEffect
        • Else - Actions
          • Do nothing

  • Revive Hero
    • Events
      • Unit - A unit owned by Player 1 (Red) Dies
      • Unit - A unit owned by Player 2 (Blue) Dies
      • Unit - A unit owned by Player 3 (Teal) Dies
      • Unit - A unit owned by Player 4 (Purple) Dies
      • Unit - A unit owned by Player 5 (Yellow) Dies
      • Unit - A unit owned by Player 6 (Orange) Dies
      • Unit - A unit owned by Player 7 (Green) Dies
      • Unit - A unit owned by Player 8 (Pink) Dies
      • Unit - A unit owned by Player 9 (Gray) Dies
      • Unit - A unit owned by Player 10 (Light Blue) Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • Wait 4.00 seconds
      • Hero - Instantly revive (Dying unit) at PlayerRevivePoint[(Custom value of (Dying unit))], Show revival graphics
      • Camera - Pan camera for (Owner of (Dying unit)) to PlayerRevivePoint[(Custom value of (Dying unit))] over 5.00 seconds
      • Unit - Set life of (Dying unit) to 100.00%
      • Unit - Set mana of (Dying unit) to 100.00%
 
Level 3
Joined
Mar 6, 2007
Messages
48
dude you need to give a better description of what is going on, not only that but tag your triggers as well!
 
Level 6
Joined
Feb 2, 2005
Messages
205
First of all you can merge the upper Trigger heavily to only on if
  • Set Revive Location
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
      • And - All (Conditions) are true
      • Conditions
        • ((Buying unit) is A Hero) Equal to True
        • (Item-type of (Sold Item)) Equal to Set Revive Location
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • OR - Multiple Conditions
            • (Selling unit) Equal to Soul Keeper 0118 <gen>
            • (Selling unit) Equal to Soul Keeper 0049 <gen>
            • (Selling unit) Equal to Soul Keeper 0082 <gen>
            • (Selling unit) Equal to Soul Keeper 0165 <gen>
            • (Selling unit) Equal to Soul Keeper 0384 <gen>
        • Then - Actions
          • Set TempPoint_2 = (Position of (Buying unit))
          • Special Effect - Create a special effect at TempPoint_2 using Abilities\Spells\Demon\ReviveDemon\ReviveDemon.mdl
          • Set TempSpecEffect = (Last created special effect)
          • Custom script: call RemoveLocation(udg_TempPoint_2)
          • Set TempPoint_2 = (Center of Start <gen>)
          • Set PlayerRevivePoint[(Custom value of (Buying unit))] = TempPoint_2
          • Wait 0.00 seconds
          • Custom script: call RemoveLocation(udg_TempPoint_2)
          • Game - Display to (All players matching ((Owner of (Buying unit)) Equal to (Matching player))) for 5.00 seconds the text: Your revive locatio...
          • Wait 2.00 seconds
          • Special Effect - Destroy TempSpecEffect
        • Else - Actions
          • Do nothing
The Second one i would Create with a Unit-Array for the Heros, set your Hero Array were you choose/create the Heros.

On my Example all have predefined Heros
  • Events
    • Map Ini
  • Actions
    • Hero[1] = Hero for Player 1
    • Hero[2] = Hero for Player 2
    • ....and so on
  • Revive Hero
    • Events
      • Unit - A unit owned by Player 1 (Red) Dies
      • Unit - A unit owned by Player 2 (Blue) Dies
      • Unit - A unit owned by Player 3 (Teal) Dies
      • Unit - A unit owned by Player 4 (Purple) Dies
      • Unit - A unit owned by Player 5 (Yellow) Dies
      • Unit - A unit owned by Player 6 (Orange) Dies
      • Unit - A unit owned by Player 7 (Green) Dies
      • Unit - A unit owned by Player 8 (Pink) Dies
      • Unit - A unit owned by Player 9 (Gray) Dies
      • Unit - A unit owned by Player 10 (Light Blue) Dies
  • Conditions
    • ((Dying unit) is A Hero) Equal to True
  • Actions
    • Wait 4.00 seconds
    • Hero - Instantly revive Hero[Player Number(Triggering Player)] at PlayerRevivePoint[(Custom value of Hero[Player Number(Triggering Player)])], Show revival graphics
    • Camera - Pan camera for (Owner of Hero[Player Number(Triggering Player)]) to PlayerRevivePoint[(Custom value of Hero[Player Number(Triggering Player)])] over 5.00 seconds
    • Unit - Set life of Hero[Player Number(Triggering Player)] to 100.00%
    • Unit - Set mana of Hero[Player Number(Triggering Player)] to 100.00%
I didn't test it or can proof correctness of Vars etc, no WE on Front of me.
 
Status
Not open for further replies.
Top