• 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.

Booting player system (using dialogs)

Level 5
Joined
Sep 7, 2008
Messages
139
BearMan
Presents:
Booting Player System
Using Dialogs

Introduction:
This is a short tutorial on how to create a pretty cool booting(kick) system using dialogs. I think it looks a little better, it's more advanced but it gives Player 1 (Red) the great opportunity to kick players with a good overview on which player to kick. Before going to this tutorial I suggest that you look into the Basics of a Dialog tutorial created by regingspeedhorn and Orc_Tamer.
The Variables:
We will be creating two variables for this tutorial.
tutorialvariablesfn8.jpg

Create a variable and name it: BootDialog and set the type as Dialog, then create a second one and name it BootDialogButton and set the type to Dialog Button. Array the Dialog Button variable with a size of 4 (or the number of players in your game).
Triggers:

Creating the dialog:
  • Create Dialog
    • Events
      • Player - Player 1 (Red) types a chat message containing -boot as An exact match
    • Conditions
    • Actions
      • Dialog - Clear BootDialog
      • Dialog - Change the title of BootDialog to Boot Player(s)
      • If ((Player 2 (Blue) slot status) Equal to Is playing) then do (Dialog - Create a dialog button for BootDialog labelled (Kick + (Name of Player 2 (Blue)))) else do (Do nothing)
      • Set BootDialogButton[1] = (Last created dialog Button)
      • If ((Player 3 (Teal) slot status) Equal to Is playing) then do (Dialog - Create a dialog button for BootDialog labelled (Kick + (Name of Player 3 (Teal)))) else do (Do nothing)
      • Set BootDialogButton[2] = (Last created dialog Button)
      • If ((Player 4 (Purple) slot status) Equal to Is playing) then do (Dialog - Create a dialog button for BootDialog labelled (Kick + (Name of Player 4 (Purple)))) else do (Do nothing)
      • Set BootDialogButton[3] = (Last created dialog Button)
      • Dialog - Create a dialog button for BootDialog labelled Exit
      • Set BootDialogButton[4] = (Last created dialog Button)
      • Dialog - Show BootDialog for Player 1 (Red)
What this does is that if there is a player it creates a dialog button with the name of the player. And another button that says "Exit".


Booting the chosen player(s):
  • Boot Players
    • Events
      • Dialog - A dialog button is clicked for BootDialog
    • Conditions
    • Actions
      • If ((Clicked dialog button) Equal to BootDialogButton[1]) then do (Game - Defeat Player 2 (Blue) with the message: Kicked!) else do (Do nothing)
      • If ((Clicked dialog button) Equal to BootDialogButton[2]) then do (Game - Defeat Player 3 (Teal) with the message: Kicked!) else do (Do nothing)
      • If ((Clicked dialog button) Equal to BootDialogButton[3]) then do (Game - Defeat Player 4 (Purple) with the message: Kicked!) else do (Do nothing)
      • If ((Clicked dialog button) Equal to BootDialogButton[4]) then do (Dialog - Hide BootDialog for Player 1 (Red)) else do (Do nothing)
What this does is if a button is clicked the specific action will happen. Either kicking the selected player or exiting from the dialog.
Summary:
And that's about it. If you have any questions you can send me a personal message and I'll try to answer your question. Thank you for viewing this tutorial!

This is what the Dialog look like in game: (with one computer playing)
bootplayersingameimageup2.jpg

 

Attachments

  • BootPlayerTutorial by BearMan.w3x
    20 KB · Views: 46
Last edited:
Level 40
Joined
Dec 14, 2005
Messages
10,532
It would help if it was more than a "here, have a trigger" thread - if it actually explained what it was doing as it went along, at least to an extent.

Beyond that, you really should be using a loop for your trigger (rather than a wall of individual checks), filtering computers, and so on.
 
Top