1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. The member Kam is making HIVE coasters. Take a look. For every coaster you buy, Hive gets $1.
    Dismiss Notice
  3. Buy it, use it, break it, fix it, trash it, change it, mail - upgrade it. Join (Optionally) Paired Techtree Contest #11 - Techno Magic now!
    Dismiss Notice
  4. Dismiss Notice
  5. Hero Contest #8 is up and running! This time it's a joint contest between artists and coders. Go here for team matchmaking.
    Dismiss Notice
  6. The ninth Concept Art Contest has launched. Enter now!
    Dismiss Notice
  7. Our first StarCraft contest, The Galaxy Terraining Contest #1 - World Wonders has started. Enter to show off your Galaxy Editor skills and win a custom rank icon among other things.
    Dismiss Notice
  8. Ever wanted to get your sets ready for fast texturing while still having fun? Now it is possible with our newest Mini-Texturing Contest.
    The Skeleton Units need your dire help!
    Dismiss Notice

Game modes, like in Pudge Wars

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

  1. CraZy.FroG[B]

    CraZy.FroG[B]
    Joined:
    Sep 14, 2004
    Messages:
    157
    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

    GhostWolf
    Joined:
    Jul 29, 2007
    Messages:
    4,078
    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

    busterkomo
    Joined:
    Jun 17, 2007
    Messages:
    1,422
    Use dialogs and then compare the clicked button, then set a var accordingly.
     
  4. Just_Spectating

    Just_Spectating
    Joined:
    May 16, 2007
    Messages:
    6,924
    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]

    CraZy.FroG[B]
    Joined:
    Sep 14, 2004
    Messages:
    157
    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