• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

9 Hero Revival?

Status
Not open for further replies.
Level 4
Joined
Nov 1, 2006
Messages
54
Hi, the problem seems to be getting 9 heros to revive for one player if ALL 9 die at the same time. Its like this, purple has 9 heros, each of which are kings, if one of them dies it is revived in 5 minutes at purple's castle. I have 9 of these triggers for all 9 heros, simple, and it usually works if like 7 of them die and 2 are alive still the other 7 will revive when the 5 minutes is up. But if ALL 9 heros die, then only 7 of them revive after and when the other two should revive only the text line appears (Game - Display to Player Group - Player 4 (Purple) for 5.00 seconds the text: Your King has bee...) meaning that the other two heros should have revived because the trigger ran, but no luck, only 7 revive then and the other 2 are lost and will not come back. Ive tried everything to get all 9 reivving if all 9 die, but no luck with altars, variables, even game cache but still only 7 revive when all 9 die. I did try one thing, switching control of one of the king heros to neutral passive when it revived, then switched back to purple right after, it revived all 9 yes, but they were not in the right hero order, this is another aspect. I need them to be in the right hero order, King, King2, King3, King4 ect all the way to 9, switching control to neutral passive made like King8 first then King2 ect. Anyone have any ideas on what I can do here, or how to make an altar have 9 spots so 9 heros can be revived at it?
Events
Unit - King 0591 <gen> Dies
Conditions
(Castle 0008 <gen> is alive) Equal to True
(Keep 0638 <gen> is alive) Equal to True
Actions
Game - Display to (All players) for 5.00 seconds the text: King revival...
Wait 300.00 seconds
Hero - Instantly revive King 0591 <gen> at (Center of Kingrespawn <gen>), Show revival graphics
Game - Display to Player Group - Player 4 (Purple) for 5.00 seconds the text: Your King has bee...
 
Level 8
Joined
Jun 18, 2007
Messages
214
Hmmm... not sure I fully understood you, but here what you should try:

Make one trigger:

  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Triggering unit) Equal to King <his number> <gen>
          • (Triggering unit) Equal to King <his number> <gen>
          • (Triggering unit) Equal to King <his number> <gen>
          • (Triggering unit) Equal to King <his number> <gen>
          • (Triggering unit) Equal to King <his number> <gen>
          • (Triggering unit) Equal to King <his number> <gen>
          • (Triggering unit) Equal to King <his number> <gen>
          • (Triggering unit) Equal to King <his number> <gen>
          • (Triggering unit) Equal to King <his number> <gen>
    • Actions
      • Custom script: local unit u = GetTriggerUnit()
      • Custom script: local location l = GetRectCenter(YourRectHere())
      • Custom script: call TriggerSleepAction(300)
      • Custom script: call ReviveHeroLoc(u, l, true)
      • Custom script: call RemoveLocation( l )
      • Custom script: set u = null
See, now it's Or function it will happen when any of them died or they all die, and it revives them. Now
  • (Triggering unit) Equal toKing <his number> <gen>
Now if you are going to use this make a trigger, with even Unit Dies, then set Condition Or - then choose all of your kings. Where it says Costum Script: local location l = GetRectCenter(<YourRectHere>()), YouRectHere stands for the region you want them to respawn in.

EDIT: FOR YOU it should look like this
Make one trigger:

  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Triggering unit) Equal to King <his number> <gen>
          • (Triggering unit) Equal to King <his number> <gen>
          • (Triggering unit) Equal to King <his number> <gen>
          • (Triggering unit) Equal to King <his number> <gen>
          • (Triggering unit) Equal to King <his number> <gen>
          • (Triggering unit) Equal to King <his number> <gen>
          • (Triggering unit) Equal to King <his number> <gen>
          • (Triggering unit) Equal to King <his number> <gen>
          • (Triggering unit) Equal to King <his number> <gen>
    • Actions
      • Custom script: local unit u = GetTriggerUnit()
      • Custom script: local location l = GetRectCenter(gg_rct_Kingerspawn)
      • Custom script: call TriggerSleepAction(300)
      • Custom script: call ReviveHeroLoc(u, l, true)
      • Custom script: call RemoveLocation( l )
      • Custom script: set u = null
Copy this, and just choose your kings in Condition of the trigger, all 9 of them.
 
Level 4
Joined
Apr 25, 2008
Messages
75
  • King Dies
    • Events
      • Unit - A unit owned by Player 1 (Red) Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Captain
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Dying unit) Equal to King[0]
        • Then - Actions
          • Countdown Timer - Start KingTimer[0] as a One-shot timer that will expire in 300.00 seconds
          • Trigger - Turn on Revive0 <gen>
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Dying unit) Equal to King[1]
        • Then - Actions
          • Countdown Timer - Start KingTimer[1] as a One-shot timer that will expire in 300.00 seconds
          • Trigger - Turn on Revive1 <gen>
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Dying unit) Equal to King[2]
        • Then - Actions
          • Countdown Timer - Start KingTimer[2] as a One-shot timer that will expire in 300.00 seconds
          • Trigger - Turn on Revive2 <gen>
        • Else - Actions
  • Revive0
    • Events
      • Time - KingTimer[0] expires
    • Conditions
    • Actions
      • Hero - Instantly revive King[0] at (Center of (Playable map area)), Show revival graphics
      • Trigger - Turn off (This trigger)
  • Revive1
    • Events
      • Time - KingTimer[0] expires
    • Conditions
    • Actions
      • Hero - Instantly revive King[0] at (Center of (Playable map area)), Show revival graphics
      • Trigger - Turn off (This trigger)
  • Revive2
    • Events
      • Time - KingTimer[0] expires
    • Conditions
    • Actions
      • Hero - Instantly revive King[0] at (Center of (Playable map area)), Show revival graphics
      • Trigger - Turn off (This trigger)
  • Revive All
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
      • (Number of living Captain units owned by Player 1 (Red)) Equal to 0
    • Actions
      • Hero - Instantly revive King[0] at (Center of (Playable map area)), Show revival graphics
      • Hero - Instantly revive King[1] at (Center of (Playable map area)), Show revival graphics
      • Hero - Instantly revive King[2] at (Center of (Playable map area)), Show revival graphics
      • Trigger - Turn off Revive0 <gen>
      • Trigger - Turn off Revive1 <gen>
      • Trigger - Turn off Revive2 <gen>
Hope this helps. Make sure you do for all 9 heroes. And you might also want to learn about arrays if you don't already know.

BTW Revive0, Revive1, Revive2, all the way to Revive8 must be initially off.

EDIT: Just found a quick way to do that last trigger:
  • For each (Integer A) from 0 to 8, do (Hero - Instantly revive King[(Integer A)] at (Center of (Playable map area)), Show revival graphics)
Think that works!
 
Level 4
Joined
Nov 1, 2006
Messages
54
Well, these all may not work, as it was not the revival triggers that actually made it "not work" it's the fact that warcraft can only display 7 hero portraits on the side of the screen and therefore only acknowledges 7 heros that purple owns, but ill give them a try and see.
 
Level 4
Joined
Apr 25, 2008
Messages
75
Well, these all may not work, as it was not the revival triggers that actually made it "not work" it's the fact that warcraft can only display 7 hero portraits on the side of the screen and therefore only acknowledges 7 heros that purple owns, but ill give them a try and see.

If the heroes don't need to be heroes them don't make them heroes. I find it hard enough to control more than 1 hero so I never use more than 2 heroes for 1 person. Now if they absolutely need to be heroes you can hide the hero icon. I'm not quite sure how to but I'm sure someone out there knows.
 
Level 8
Joined
Jun 18, 2007
Messages
214
Well, these all may not work, as it was not the revival triggers that actually made it "not work" it's the fact that warcraft can only display 7 hero portraits on the side of the screen and therefore only acknowledges 7 heros that purple owns, but ill give them a try and see.

Also having that much hero, can 'cause bugs. I also advise you to change them to regular units. But, I tested the spell I posted up there and it's working. if you don't understand something about it, just say.
 
Status
Not open for further replies.
Top