+ Reply to Thread
Results 1 to 8 of 8

Thread: Making a gamemode, how to choose teams?

  1. #1
    Wire Sofaking Asphid's Avatar
    Join Date
    Oct 2008
    Location
    In a house.
    Posts
    1,023

    Default Making a gamemode, how to choose teams?

    So I'm new to lua. In order to learn it, I wanted to try something kind of simple and work from there. I'm making a rather simple gamemode, just a team based sandbox. Everything I've found for teams involves the gamemode automatically choosing a random team for a player when they start. However, I want people to be able to choose their team, and then be able to choose again anytime in the future. I've manged to set up a simple derma, with 3 buttons, each relating to a team. How would I translate the click of a button to choosing a team?
    <Anticept>Will sex for food.
    <Beer>peanus, I like that
    <nath2008uk>I must play with black peanus
    <Jat Goodwin>i like the underage one
    <Black Phoenix>He's a good pedo

  2. #2
    Wire Sofaking ZeikJT's Avatar
    Join Date
    Dec 2008
    Location
    California
    Posts
    1,391

    Default Re: Making a gamemode, how to choose teams?

    Hook it to this: Player.SetTeam - GMod Wiki ?

    EDIT: Also this will be useful for team naming etc. http://wiki.garrysmod.com/wiki/?title=Team
    Against stupidity the Gods themselves contend in vain.
    -Friedrich Schiller

    The flame puts me in the mood to "Do it!".
    -Dart, Legend of Dragoon

  3. #3
    Wire Sofaking Asphid's Avatar
    Join Date
    Oct 2008
    Location
    In a house.
    Posts
    1,023

    Default Re: Making a gamemode, how to choose teams?

    So I would have

    Code:
    function ChooseRed ( )
    Player.SetTeam(1)
    end
    
    DermaButton.DoClick = hook.Add( "DoClick", ChooseRed )
    ?

    I'm not so sure of hooks yet...
    <Anticept>Will sex for food.
    <Beer>peanus, I like that
    <nath2008uk>I must play with black peanus
    <Jat Goodwin>i like the underage one
    <Black Phoenix>He's a good pedo

  4. #4
    Wire Noob Mr Affinity's Avatar
    Join Date
    Jan 2008
    Posts
    29

    Default Re: Making a gamemode, how to choose teams?

    Making a gamemode is one of the most advanced things you could do in GMod Lua, I suggest learning the language itself before making a gamemode.

    Mainly because as I can see from your code above, you are just throwing things together.

  5. #5
    Wire Sofaking Asphid's Avatar
    Join Date
    Oct 2008
    Location
    In a house.
    Posts
    1,023

    Default Re: Making a gamemode, how to choose teams?

    Alright then.

    What would you suggest I try to help me learn it?
    <Anticept>Will sex for food.
    <Beer>peanus, I like that
    <nath2008uk>I must play with black peanus
    <Jat Goodwin>i like the underage one
    <Black Phoenix>He's a good pedo

  6. #6
    Wire Sofaking Whodunnit's Avatar
    Join Date
    Jan 2008
    Location
    New Zealand, Ackl
    Posts
    636

    Default Re: Making a gamemode, how to choose teams?

    What we need is a team combat sandnox gamemode where there are buildtimes , proplimits and combat times.

  7. #7
    Wire Sofaking ZeikJT's Avatar
    Join Date
    Dec 2008
    Location
    California
    Posts
    1,391

    Default Re: Making a gamemode, how to choose teams?

    Quote Originally Posted by Asphid_Jackal View Post
    Alright then.

    What would you suggest I try to help me learn it?
    While I do try to suggest that people start with something they want to make it can be beneficial to do something before a gamemode. Try making some SENTs or SWEPs if you have any ideas for them.

    I'm actually also helping (or trying my best at least) to help turck3 learn lua:
    Learning Lua

    Some of the info there might prove useful to you.

    I'd help you with the gamemode but I've never made dermas or gamemodes yet. What did you have in mind? Team sandbox implies people building on a team, but to make what? Is it competitive? Point allocation?
    Against stupidity the Gods themselves contend in vain.
    -Friedrich Schiller

    The flame puts me in the mood to "Do it!".
    -Dart, Legend of Dragoon

  8. #8
    Wire Sofaking Asphid's Avatar
    Join Date
    Oct 2008
    Location
    In a house.
    Posts
    1,023

    Default Re: Making a gamemode, how to choose teams?

    What I wanted to do was three teams, Red, Blue, and Neutral (Grey).

    Red and Blue are against each other, while Grey is with and against both.

    Disable weapon/entity spawning for Red and Blue, and make a system where they order through Grey. I dunno if you've messed with the SBEP, but it would basically be the SEnts from there (ships, weapons, turret mounts, etc.).

    You get money from killing the other team, lose money for killing Grey.

    In the long run, it's turn into a RP-type game, but I wanted to just try and get bits and pieces done and memorized to make it easier in the end.
    <Anticept>Will sex for food.
    <Beer>peanus, I like that
    <nath2008uk>I must play with black peanus
    <Jat Goodwin>i like the underage one
    <Black Phoenix>He's a good pedo

+ Reply to Thread

Similar Threads

  1. Puzzle Gamemode 1.3
    By Tuollaf in forum Off-Topic
    Replies: 1
    Last Post: 08-27-2008, 01:43 PM
  2. Abilty To Choose Numpad I/O Models
    By Jack in forum Ideas & Suggestions
    Replies: 7
    Last Post: 03-26-2008, 08:52 AM
  3. Ability To Choose How Many Outputs
    By Jack in forum Ideas & Suggestions
    Replies: 2
    Last Post: 03-24-2008, 06:41 PM
  4. Wiremod gamemode
    By Korezz in forum Ideas & Suggestions
    Replies: 4
    Last Post: 12-24-2007, 11:49 AM
  5. Choose Value?
    By Wurmy1029 in forum Installation and Malfunctions Support
    Replies: 9
    Last Post: 08-19-2007, 04:07 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots