• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Duel System Please Help

Status
Not open for further replies.
Level 4
Joined
Jun 25, 2008
Messages
67
Ok, this is probably an easy one to solve, but i'm trying to create a duel system.

What i want is a player to say -duel (player color)
Then for the player that was picked (the one where it is player color) to bring up a dialog that says (Player Name) has challenged you to a duel, do you accept? And it just brings up a yes/no dialog. Thats all, and if they accept, it displays a message, (Player Name) has accepted your challenge or if they decline, then it says (Player Name) has declined your challenge.

Could someone please help me with this?
Thanks in advance :)
 
Level 11
Joined
May 26, 2008
Messages
174
hunnnnn i really think this is not so much hard, i'll help you

i dont like trigger tags

E> player 1 types a chat mesage containing the text -duel2
C> Player 2 slot status equal to is playing equal to true
A> set Duel[1] = casting unit
A> set Duel[2] = Traget unit of Ability Beign cast
A>i hate create dialogs so do this by yourself

after dialogs

E> a dialog button is clicked for dialog
C> clicked dialog button euqal to dialogbutton2
A> move unit Duel[1] instantly to XXXX
A> the same for Duel[2]

now you only need to make one of each trigger for each player(i think, i hate dialogs) and you can have fun with your duel system
but i hink you will need of 1 dialog for each player
 
Level 4
Joined
Jun 25, 2008
Messages
67
oohh thnx, but like do you think you can help me in the beggining part, for like when a player says -duel (player color), how can i make the color part into a substring, because this map has 12 players
like Player (Color) enters -duel as a substring.
and then like idk how to do the rest
 
Level 11
Joined
Feb 22, 2006
Messages
752
Just compare strings. I forget what the stuff is actually called in GUI but in pseudocode (or pseudoGUI...):

Event
-Player enters "-duel" as substring

Actions
-If (entered text message) equal to ("-duel red") then do ...
-If (entered text message) equal to ("-duel blue") then do ...

And so on for all the possible colors.
 
Status
Not open for further replies.
Top