1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Choose a model and craft your spell in Zephyr Contest #15!
    Dismiss Notice
  3. Compete in Concept Art Contest - Bounty Hunter . May the best artist's bounty hunter execute!
    Dismiss Notice
  4. The Modeling Mini-Contest #5 - Familiar is up! Compete to design a pet companion to a lonely WC3 Hero of your preference.
    Dismiss Notice
  5. The 6th installment of our Music Contest just got fired up! Now with an Apocalyptic taste. Get started and compete in this musical battle!
    Dismiss Notice
  6. Looking to expand an altered melee race of yours? Join the Advanced Techtree Contest - Recycle, Revise, Reinvent contest!
    Dismiss Notice

Game modes, like in Pudge Wars

Discussion in 'Triggers & Scripts' started by CraZy.FroG[B], Dec 29, 2007.

  1. CraZy.FroG[B]

    Sep 14, 2004
    hello, I want to make a game mode system like the one that's in Pudge Wars. In case you haven't heard or tried Pudge Wars, the game starts like this; when the game starts, a window pops up for the host with several features that can be choosed, such as 20 kills = win or 50 kills = win etc.

    I'm been trying to make the system myself, but it doesn't seem to work whatsoever. can anyone fill me in on what to do? or give me an template if possiple to make life easier for me? :D

    thanks in advance.
  2. GhostWolf

    Jul 29, 2007
    You use a integer that is the kills you need to win.
    For example, you set a integer called "Win" to 50 (if 50 was chosen) and then use another integer called "Kills", and whenever a hero is killed you set Kills to (Kills + 1) then you check if "Kills = Win" and if it is, the team that "owns" Kills wins.
  3. busterkomo

    Jun 17, 2007
    Use dialogs and then compare the clicked button, then set a var accordingly.
  4. Just_Spectating

    May 16, 2007
    Read This! It will Help you!

    ok, in a trigger of initialization, you have to create a dialog box, and variable it, then you have to make buttons and variable them too,(you should use arrays, its easier) then, in another trigger, you can check if the player pressed a button(which is set as a variable) and make the mode set, which i will tell you later.

    you will still need the trigger at the beginning like game time is 1 second, then show dialog box(set as variable) for player 1(red) or whom ever picks the game mode.

    Next, you need separate triggers to determine how many kills you need to win

    so each trigger you will start off with
    "Unit - Generic unit dies"
    the event
    Triggering unit is a hero = true (in the boolean section)
    and action

    For this action however, you will need to set a variable(namely Kills, integer variable) and then in the actions, above
    set (variable, Kills) = (variable, Kills + 1)
    and after that you add an If Then Else trigger
    If (variable, Kills) = (ok game mode one, so lets say, 20)
    Then (make victory for all players allied to the killing player and the killing player)
    Else (leave that blank)

    Other gamemodes, just copy the trigger, and change If (variable, Kills) = (this number to 40, 60, etc. all the way for the number of game modes)

    For every Gamemode trigger, go to the top of the trigger, not way top, but you will see 2 boxes that are checked, uncheck the one that says "initially on"

    Ok Now,
    In those triggers with the button pressing,(which the player presses button(variable) trigger) then in the actions, you create all the pudge(or w.e) for the players, you know yadda yadda set up the map, then add the trigger, Turn on trigger and turn on the game mode that the button is reffering to. So if this trigger is for Game mode 1(the pressed button is for game mode 1), you would turn on the Game mode 1 trigger(that is initially off) to On.

    Ok, im sure that should wrap it up, if you need any questions ask.
  5. CraZy.FroG[B]

    Sep 14, 2004
    thnks for the fast response guys.

    I want to point out that i've changed my decision, i'm using a in-game chat mode selection instead of a dialog.

    and also, the map is a arena map, with 6 players, all vs all, meaning no allies.

    now for the trigger, The only thing I need to get working is the winning condition trigger. I've set the whole thing up with variables etc. but i've tried different stuff out with ''If Player1Kills equals 15 then Game - Victory.... for Player 1 '' etc. but it doesn't seem to work.

    can anyone fill me in on how to make, for example, player 1 win if he gets 15 hero kills?

    PS: I'm also using a Multiboard, nothing fancy tho, it only shows Player name, hero kills and deaths.
    Last edited: Jul 10, 2008