• 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.

Hero Revival

Status
Not open for further replies.
Level 5
Joined
Sep 30, 2010
Messages
106
so, I made lots of passive heroes and I want them to revive in different regions but when they die they revive in one and whats the problem?

I do this kind of trigger on every hero but I put path on different regions...

620f63869158.png
 
Level 13
Joined
Oct 25, 2009
Messages
995
Use random point,or u set the Region using Variables.
  • Start
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Regions[1]= (Your Region)
      • Set Regions[2]= (Your another Region)
      • Set Regions[3]= (Your another another Region)
Then like this o.o
  • Events:
    • Unit - A unit owned by (Owner of 0017<gen>) Dies
  • Conditions:
    • ((Triggering unit) is A Hero) Equal to True
  • Actions:
    • Wait ((Real((Level of (Triggering unit))))x 1.00)seconds
    • Hero - Instantly revive (triggering unit) at Regions[Random Integer Number between 1-3],Show revival graphics
Or you means this?
  • Events:
    • Unit - A unit owned by (Owner of 0017<gen>) Dies
  • Conditions:
    • ((Triggering unit) is A Hero) Equal to True
  • Actions:
    • Wait ((Real((Level of (Triggering unit))))x 1.00)seconds
    • Hero - Instantly revive (triggering unit) at (Random point of ReviveNeutral1 <gen>),Show revival graphics
??
 
Level 10
Joined
Apr 22, 2010
Messages
422
that trigger makes ALL heros own by that play to revive at the CENTER of that region.If you want the hero to revive in random areas, then i would use an randomizer to get a integer, then based ion that integer, make the hero revive in a specific area.
I only do GUI since vjass isnt my specialty, so dont ask me if you can use jass since im sure you could but i wouldent know how....
 
Level 5
Joined
Sep 30, 2010
Messages
106
well I want it to be like in wow, where neutrals are unlimited, so I've decided to do like that in WC 3, when neutral dies, it would revive after some time.. like pig should revive in orgrimmar, or when you go to northrend and kill crypt fiend, it should revive in northrend.. but when I kill crypt fiend it revives in orgrimmar and that's the problem and how can I fix it? I put path of different units in different regions but they revive in one and what's the mistake?
 
Level 12
Joined
Jan 30, 2009
Messages
1,067
Okay, I know what you meant by your description. Let's see if this will do what you want.

  • Revive
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Wait (Real(((Hero level of (Triggering unit)) x 1))) seconds
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Area1 <gen> contains (Triggering unit)) Equal to True
        • Then - Actions
          • Hero - Instantly revive (Triggering unit) at (Center of GY1 <gen>), Hide revival graphics
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Area2 <gen> contains (Triggering unit)) Equal to True
            • Then - Actions
              • Hero - Instantly revive (Triggering unit) at (Center of GY2 <gen>), Hide revival graphics
            • Else - Actions
ofc you need to put in conditions so it revives the passive heroes, but that is a simple matter explained above.

Test map is included, i tested it, it works. Not leakless, though.
 

Attachments

  • Revive Area Test.w3x
    18.2 KB · Views: 37
Level 12
Joined
Jan 30, 2009
Messages
1,067
inaccurate?

My solution is rather accurate, tyvm.

Worked just fine in the test map.
 
Level 12
Joined
Jan 30, 2009
Messages
1,067
Doesn't mean you should call it "inaccurate" and "crap" that is just plain rude.

Yours may be better in comparison, but that doesn't make my solution crap, just because it isn't done the same way yours is. Waits aren't the best, no, but they were what he used, and it took me all of 2 minutes to come up with a "WORKING" solution with a test map for what he was trying to do.

it's editable, expandable, fixable. Doesn't make it crap.
 
Status
Not open for further replies.
Top