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

Duel System ( only 2 players )

Status
Not open for further replies.
Level 5
Joined
Aug 6, 2009
Messages
136
Hi there!

I was just making a boss map. And i was wondering.
Can i make a duel system like this one? :

There is this specific area where there must be 2 players inside it to duel.
So when there is 2 players inside this area,they will get teleported to the arena where you fight the other player.

And when 1 of the players dies,they will get teleported back.

(triggers would be appreciated)

Also i know some few basics about the worldeditor. But im weak with Variables.

So could anyone help me?

Thanks :thumbs_up:
 
Level 20
Joined
Feb 24, 2009
Messages
2,999
hehe, first off what do you need it for? Do you plan to make a map for playing with friends on BNet? How many players, etc?

For e.g. if it's more than 2 players but only 2 will be in the duel then we may need to dabble in variables, but if it's only 2 players anyway, you could probably get by without them...


Variables - Briefly

The best way i've seen variables described is as 'filing cabinets' in which we can store information.

We can store almost anything in variables, units, unit's health/mana values or groups of units and much, much more.

This is essentially allows us to make the game 'remember' certain things, we can call upon later in triggers - which is why it is essentially like storing information in these 'filing cabinets', which we can tell the game to look through later in order to use stored information in a trigger.

Variables are split into several types, each type can hold certain information, imagine it's like colour coded cabinets, you
can't put a green folder in the red cabinet.

Some common variable types are: Real, Boolean, Integers and Units.

Real = Real Values, these are continuous numeric values, e.g. they can have decimal places, so things like unit health and mana/time of day can be stored in these.

Integers = Integer Values, these are 'whole' numbers, so only whole numbers like the amount of units in a particular area/region of the map can be stored in these variables.

Units = Exactly that, you can store units in these variables, so if we were to store a unit, then kill it, we could make the game bring back exactly the same unit, because it will remember/have record of exactly what it was like.

Boolean = Boolean variables store 'True' or 'False' values and can really - as far as I know - only store/be equal to two values... 'True or False'\'Yes or No'.

Unit and Boolean variables would probably be most important to your duel system, storing the combatants and checking whether one is dead/winner/in the arena etc...

Your duel system and things you could do, including and excluding variables

There is so many ways you could go about this... really your best bet is to find a map you have seen such a system on and assuming it's unprotected, open it and see how the triggers work in that, or check the tutorial section and see if anything helps - I don't see very much point in me handing you a trigger if you barely understand how it works, else you won't be able to tweak to your liking, however if your desperate/can't find anything post back and i'll see what I can do!
 
Level 9
Joined
Oct 17, 2009
Messages
370
When i started with world editor i checked the different kind of triggers i had and how i could use them, after that i tested to make some simple triggers including variables and such, now i know pretty much about triggers, you just have to play around with world editor and you will learn for yourself how you should do.
 
Level 20
Joined
Feb 24, 2009
Messages
2,999
When i started with world editor i checked the different kind of triggers i had and how i could use them, after that i tested to make some simple triggers including variables and such, now i know pretty much about triggers, you just have to play around with world editor and you will learn for yourself how you should do.

Very well said, +Rep

Absolutely nothing beats experience and perseverance! Keep at it, check out some other maps and ask about things bit by bit rather than for whole triggers, that way one day you'll be able to make your own, best of luck! :thumbs_up:
 
Level 5
Joined
Aug 6, 2009
Messages
136
Yeh that is true too. But i allways had problems with variables. I just dont get this with Array and like False/true in the variables.

And yes i was wondering like only 2 players could duel when entering the specific area. But that there is 6 players in the map.
 
Level 20
Joined
Feb 24, 2009
Messages
2,999
Well, arrays - continuing on from what I said early, are like draws in these 'filing cabinets (variables)', so for e.g.

You could name a filing cabinet (unit variable) 'Player's Unit' and make it have 12 draws, one for each player (you set the array to size: 12), then when storing stuff in the variable it will ask which 'draw' or 'array' you wish to store it in.

These are useful for when you want to do MUI systems (works for multiple players simultaneously) and it's alot tidier and easier to organize than when you have 12 different variables for each player!
 
Level 5
Joined
Aug 6, 2009
Messages
136
So how should i do when creating the trigger?
First off make the variable but how to make it later on? Gah confused >.<
 
Level 9
Joined
Oct 17, 2009
Messages
370
in the trigger editor, press the yellow X at the top, right click in the empty field, and select "New Variable..." now a new window pop up, Name it to whatever you want, set the type to Unit and check the "Array" checkbox, change the size number to 12. You're done with creating the variable! Now to set it make a new action in the trigger: Set Variable.
Than choose the variable you just created and choose what unit should be in the variable.
 
Level 5
Joined
Aug 6, 2009
Messages
136
Ok so far as i get it. The Array shows the players from 1-12.
So how should i begin with the trigger. When unit enters region? ?
 
Status
Not open for further replies.
Top