• 🏆 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!

Checkpoint Ressurection of Hero

Status
Not open for further replies.
Level 2
Joined
Dec 11, 2018
Messages
21
Hi everyone!
Im a complete newbie when it comes to Wc3 editor but I love to play around with the editor to see what I can manage to create by without help, however for my current map I really would need help creating some kind of triggers for the following scenario:

The map is about survival and a race to the finish and as you move along through the map you will reach different checkpoints where, if you die, you´ll be ressurected. So what I would need is first an ressurection trigger that sends the hero to the beginning if no checkpoint is reached, but also the triggers that would change the ressurection destination to a new one when a checkpoint is reached.

I have myself tried to find a way to do this, but with no success and Please remember that I am a complete newbie in Wc3 editor so please be as thorough as possible.

Cheers my Wc3 Masters!
 
Level 21
Joined
May 29, 2013
Messages
1,567
Seems like you want Resurrection Stones from the Founding of Durotar bonus campaign (Rexxar campaign). You could open the map and take a look at the triggers that immediately resurrect killed heroes near the last Resurrection Stone a hero walked by. I think this has already been asked before.
 
Level 20
Joined
Aug 29, 2012
Messages
826
There are a lot of ways to achieve what you want. The most basic I can think of is creating multiple regions that would correspond to your checkpoints. Then, you would need a "Point" variable in order to store a location.

Now the triggers:

  • Set New Checkpoint 1
    • Evénements
      • Unité - A unit enters Checkpoint 1 <gen>
    • Conditions
      • ((Triggering unit) is Un héros) Egal à TRUE
    • Actions
      • Set TempPoint = (Center of Respawn 1 <gen>)
  • Respawn
    • Evénements
      • Unité - A unit Meurt
    • Conditions
      • ((Triggering unit) is Un héros) Egal à TRUE
    • Actions
      • Héros - Instantly revive (Triggering unit) at TempPoint, Masquer revival graphics
So what happens here: in trigger "Set New Checkpoint 1", I tell the game to save a specific location under the name TempPoint when a hero unit enters my region, so that I can refer to it later.
In trigger "Respawn", I say that whenever a hero unit dies, I want them to respawn at my location TempPoint.

You would need to copy the first trigger and change the different regions according to your checkpoints, so that TempPoint is updated with your new respawn point, and also make a couple changes if there are multiple players in your map (as this one would work only for single player).

That's ultra basic, but that's the gist of it.
 
Level 2
Joined
Dec 11, 2018
Messages
21
@Fang I would love it if you could show me how it would look when you have more than 1 player for these respawns. At the very most I would have 6 players on my map atm.
 
Level 7
Joined
Apr 17, 2017
Messages
316
At map init create a boolean variable with arrays, name it something like checkpoint. And use loop from 1 to player numbers, in your loop block set your checkpoint(forloopintegerA) to false.

Then use a unit enters region event
And add triggering unit is hero equal to true condition
Then set your checkpoint(player number of triggering player) to true. After that,
Create another trigger and use a unit dies event, then in your condition block, use and condition and set if triggering unit is hero equal to true and checkpoint(player number of triggering player) equal to true.
Then revive triggering unit. I am assuming each player have 1 hero, if not things are going to get ugly.
 
Status
Not open for further replies.
Top