• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

PVP

Status
Not open for further replies.
Level 6
Joined
Oct 25, 2018
Messages
108
I'm putting together a kind of battle royal where every now and then the heroes of the players in an arena face each other. How can I graph in a trigger that when they fight in the arena with each other (4 Players) Hero 1, Hero 2, Hero 3, Hero 4, when they die they appear in a cemetery (the unit revives instantly there) and the last unit stands about the region of the arena be the winner awarding 1000 golds? I want to emphasize that the player does not lose when his hero dies, and his hero respawneara in another area, called cemetery.
 
You need to first define your hero’s as variables, so when a hero is chosen and created do this in a trigger:

Event: A unit enters region *. * being the region that selects a hero

Condition: triggering unit equal to=

Owning player of triggering unit equal to=

Action: set (unit variable) to last created unit

You need to have his happen for each hero.

Then in another trigger set up:

Event: a unit dies

Condition: dying unit equal to (unit variable)

Action:

Pan camera to (cemetery camera)

Display game message to (owner of dying unit): your hero has dies but is awaiting spawn in the cemetery.
 
but that only makes my hero go directly to the cemetery after he dies. I already have this configured, what I do not have is that the event ends with having a single hero in X Region standing, giving a reward to the winning hero (the last one left in the arena, since the others will be sent to the cemetery region) and then end the event.
 
Then you need to set one variable = to the # of hero’s competing in the arena.

Set another variable for (hero’s that died) equal to 0 and when a hero dies set increase that variable by +1. When your first variable (the # competing in the arena) is equal to (# of dead + 1), then you can run secondary “if then and else” actions to check each hero variable to determine which is alive or dead. I recommend having it checked each time a hero dies.


To give the rewards to single hero, you must have the check-hero-death trigger check which hero is alive.

To do this, you need to check each hero integer. When they die, set a separate integer variable to 0. For each hero death, do this.

Then in the check-hero-death trigger, do the condition “and” where your condition must have all zero integers and one 1 integer. You’ll have to do this for each hero, where their possibility of winning exists.
 
Last edited:
Status
Not open for further replies.
Back
Top