Announcement

Collapse
No announcement yet.

need help with different team issues -.-

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • need help with different team issues -.-

    Hey,

    I am currently looking for a way to get 2 different team models to work in a quake mod.

    is there any tutorial or something how i can do this?

    I still dont understand how quake does the entire teampaly thing...

  • #2
    Not a QuakeC expert, but part of the answer:

    You must precache a "player.mdl" and then an "eyes.mdl". No choice, part of protocol 15 (standard Quake).

    Then precache "player2.mdl" or whatever you want to call 2nd model.

    The real work is deciding how a player tells the server what team he wants to be on. One way is to detect a color change every frame (Player PreThink might be best place to do this?) and use, for example, color 4 (red) to indicate a team 2 and do setmodel and setmodelsize or what not.

    Spike has info on how to log-in to Inside3D in this post: Inside3d Forums • View topic - Registering on the Inside3D Forums Part 2: The Revenge ... Inside3D is a bit "broken" right now ...

    /Not Mr. QuakeC and that's about as much as I know.
    Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

    So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...

    Comment


    • #3
      thanks, i will take a look into it.
      i was looking how Kurok did it but when i adapted the code
      i fall thru the floor on every map (looks like i broke something)..

      And yes, i also have alot of trouble to signin to inside3d, i tryed everything
      but when im signed in i get redirected to the frontpage and i am logged out
      again

      Comment


      • #4
        Hey, Baker: I'm trying to help Mabuse with this, and I was wondering if you could help me, too.

        I did some searching for mods that included the source code, and found one that uses auto team assign (3Wave CTF) and I found the QC file that enforces teamplay.

        My question to you is: If I send you the link to the teamplay.qc file, would you be able to tell which part of the Teamplay NEEDS to be implemented, and which part doesn't? A lot of the file is focusing on Team color, like blue and red skins, which Mabuse doesn't need (i don't think)

        Also, here's the specific part that enables auto teams:

        ==================
        TeamCheckTeam

        Check if the team self is on is legal, and put self in a legal team if not.
        ==================
        */
        void() TeamCheckTeam =
        {
        local float TEAM1;
        local float TEAM2;

        local float newcolor;
        local float t;

        local entity p;

        local string n;

        if( self.lastteam >= 0 )
        {
        if(TeamColorIsLegal(self.team)) {
        self.lastteam = self.team;
        return;
        }
        }

        // Assign the player to a team.

        // Sum the players on all the teams.

        TEAM1 = 0;
        TEAM2 = 0;

        p = find (world, classname, "player");

        while(p)
        {
        if (p != self) {
        if (p.team == TEAM_COLOR1)
        TEAM1 = TEAM1 + 1;
        else if (p.team == TEAM_COLOR2)
        TEAM2 = TEAM2 + 1;
        }
        p = find(p, classname, "player");
        }

        // Find the team with the least players.
        newcolor = TEAM_COLOR1;
        if (((TEAM2 < TEAM1) || (TEAM2 == TEAM1 && random() < 0.5)))
        newcolor = TEAM_COLOR2;

        // Put the player on a the new team.

        stuffcmd(self, "color ");
        t = TeamGetShirt(newcolor);
        n = ftos(t);
        stuffcmd(self, n);
        stuffcmd(self, " ");
        n = ftos(newcolor - 1);
        stuffcmd(self, n);
        stuffcmd(self, "\n");

        self.lastteam = newcolor; // Remember what team we're on
        self.team = newcolor;
        };

        /*

        Comment


        • #5
          I'm not a QuakeC coder.

          You might try to log-in at Inside3D using this info from Spike:
          Inside3d Forums &bull; View topic - Registering on the Inside3D Forums Part 2: The Revenge

          Inside3D is acting up, but it is possible to log-in with some difficulty by following Spike's instructions.
          Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

          So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...

          Comment


          • #6
            Although ...

            As a Plan B ... you could try your luck at the

            Func_Msgboard Coding Help Thread ...

            Func_Msgboard: Coding Help

            There are some familiar names there, and quite a bit of expertise in QuakeC and there are people asking/answering questions there every day.
            Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

            So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...

            Comment


            • #7
              Originally posted by Baker View Post
              I'm not a QuakeC coder.
              Really? You had me fooled.
              And yeah, I'm having problems logging on at Inside 3d (i have an account, too)

              Hopefully this gets resolved. :/

              Comment


              • #8
                its a simple precaching of the model then a setmodel call in PutClientInServer depending on what their .team value is set
                i can type. some code later tonight
                www.quakeone.com/qrack | www.quakeone.com/cax| http://en.twitch.tv/sputnikutah

                Comment


                • #9
                  Originally posted by jastolze View Post
                  Really? You had me fooled.
                  I can describe vaguely what should happen, but without actually knowing how to do any of it.

                  R00k, on the other hand, actually does know what do.
                  Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

                  So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...

                  Comment


                  • #10
                    Originally posted by R00k View Post
                    its a simple precaching of the model then a setmodel call in PutClientInServer depending on what their .team value is set
                    i can type. some code later tonight
                    That sounds awesome! And if you could help Mabuse, that would be even more awesome!

                    Maybe take a look at what I posted above, too. I know it's a lot, but I believe in you!

                    Comment


                    • #11
                      This line:
                      self.modelindex = modelindex_player; // don't use eyes
                      in client.qc's CheckPowerups function will keep overwriting the model.
                      Add a few conditions and assign a different modelindex value instead, and you can easily change the player's model.
                      Some Game Thing

                      Comment


                      • #12
                        thanks, i already added a new modelindex to the enemy team.

                        However, i kinda found a temp solution for the problem, also it works with the frikbots

                        Nothing what i wanted but it currently works.

                        Comment


                        • #13
                          mabuse since you're also able to tinker with the engine you may want to try to just set the color once on spawn and via engine remove the players abilities to choose their own color?

                          that way you dont have to monitor for cheaters.

                          Comment


                          • #14
                            yeah, i have that in mind to remove the shirt/pants color and only add
                            RED (Axis) and BLUE (Allies), but i still having troubles with the frikbots...

                            Comment


                            • #15
                              the problem is i cant get it to work with the frikbots, and i dont understand one line in the frikbot code HOW they get the teams...

                              This is still something i dont know how to make it work 100%....

                              Originally posted by R00k View Post
                              its a simple precaching of the model then a setmodel call in PutClientInServer depending on what their .team value is set
                              i can type. some code later tonight
                              i know, but when connecting an enemybot they should get the correct colors and teamvalues (ONLY red and blue allowed, so when im on red the impulse 101 connected bot should ALWAYS get blue and not the other colors...)
                              Last edited by dr_mabuse1981; 01-18-2013, 07:08 AM.

                              Comment

                              Working...
                              X