How to add more player character models

From Platinum Arts Sandbox Free 3D Game Maker
Revision as of 17:25, 20 May 2012 by Chocolatepie33 (Talk | contribs) (Created page with '*Before doing this tutorial, you need to understand how to use Code::Blocks to compile Sandbox. To do so, read the Compiling the source code tutorial first. *To start: Open …')

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
  • Before doing this tutorial, you need to understand how to use Code::Blocks to compile Sandbox. To do so, read the Compiling the source code tutorial first.
  • To start: Open up main/src/fpsgame/render.cpp. Scroll down a little bit, and you should find a list that looks like this:
    static const playermodelinfo playermodels[8] =
   {
       { "rc", "rc/blue", "rc/red", NULL, NULL, NULL, { NULL, NULL, NULL }, "rc", "rc_blue", "rc_red", true },
       { "rc/blue", "rc/blue", "rc/red", NULL, NULL, NULL, { NULL, NULL, NULL }, "rc_blue", "rc_blue", "rc_red", true },
       { "rc/red", "rc/blue", "rc/red", NULL, NULL, NULL, { NULL, NULL, NULL }, "rc_red", "rc_blue", "rc_red", true },
       { "rc/pink", "rc/blue", "rc/red", NULL, NULL, NULL, { NULL, NULL, NULL }, "rc_pink", "rc_blue", "rc_red", true },
       { "ogre", "ogre/blue", "ogre/red", NULL, NULL, NULL, { NULL, NULL, NULL }, "ogre", "ogre", "ogre", false },
       { "ogre/blue", "ogre/blue", "ogre/red", NULL, NULL, NULL, { NULL, NULL, NULL }, "ogre", "ogre", "ogre", false },
       { "ogre/red", "ogre/blue", "ogre/red", NULL, NULL, NULL, { NULL, NULL, NULL }, "ogre", "ogre", "ogre", false },
       { "uh/chars/man", "uh/chars/man", "uh/chars/man", NULL, NULL, NULL, { NULL, NULL, NULL }, "uh/chars/man", "uh/chars/man", "uh/chars/man", false }
   };

This is the code which loads all of the playermodels. The first part, the "static const" is an array which holds all of the playermodel data. In the original code, there are 8 playermodels, (4 rcs, 3 ogres and the human), and that's within the brackets. To add a playermodel, simply