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

how to make duel system

Status
Not open for further replies.

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,537
Not sure what you mean by this:
"every team has 3 parameters, Kill, Die, and Flag.
Priority with flag then Kill then ِDie less"

Anyway, I assume you mean that you want a system that makes randomly selected Heroes duel one another, while the other player's spectate.

It's usually done in Arena maps by Pausing and making all Heroes invulnerable then moving them to a specific Region (Player 1 Spectate, Player 2 Spectate, etc).

It then picks 1 Random Hero from Team A and 1 Random Hero from Team B and moves them into the Duel Arena. From there they use some Waits and Text Messages to display "3... 2... 1.. Fight!".

When the Duel starts they Unpause/Make Vulnerable the Dueling Heroes.

Then you turn on a Trigger that runs when a unit dies. Whichever unit dies is the loser in the Duel and the killing unit is the winner.

When this happens you move every unit back to their base or where they were right before the Duel started (you can save their positions in a Point variable array before the duel starts).

So it's pretty simple, all you need is some Regions, maybe a Point variable (array), and some basic logic like "If hero is dead then revive hero" and "If number of players on team X > 0 then..." so you can make sure that the Duel doesn't run into any issues.
 
Status
Not open for further replies.
Top