Default Player
by Quentin Headen · in Torque Game Engine · 10/27/2006 (10:04 am) · 9 replies
Hello. I am trying to make a racing game. This game is going to have multiple levels. When I make a new mission in the mission editor, the default player is the Orc. How can I change the default player from the Orc (The animal looking guy with the crossbow) to my own 3D model?
About the author
Just your average programmer who tries to finish the projects he starts. :) I am currently focused on creating games with Torque engines. My website is http://phaseshiftsoftware.com
#2
10/27/2006 (10:10 am)
Okay, but how can I use certain models for different missions?
#3
10/27/2006 (11:44 am)
Just instantiate a different player object for each mission that loads. Or, alternately, use a mission property, and point the player datablock reference at a datablock based on that mission property.
#4
10/27/2006 (12:10 pm)
I don't mean to be a pest, but I am new at this. How to you instantiate a different player object?
#5
10/29/2006 (4:48 pm)
Look in game.cs// Create the player object
%player = new Player() {
dataBlock = PlayerBody;
client = %this;
};
#6
%player = new Player() {
dataBlock = BoxCar;
client = %this;
};
When I put this in and start the game, the loading bar stops when it gets to the end of loading the objects, and then when I look in the console it says,"Object 'BoxCar' is not a member of the 'GameBaseData' data block class". What is going on?
10/29/2006 (5:21 pm)
Ok. I changed PlayerBody to my datablock name. The name of my datablock is, BoxCar. Here is the code:%player = new Player() {
dataBlock = BoxCar;
client = %this;
};
When I put this in and start the game, the loading bar stops when it gets to the end of loading the objects, and then when I look in the console it says,"Object 'BoxCar' is not a member of the 'GameBaseData' data block class". What is going on?
#7
http://tdn.garagegames.com/wiki/DTS/Getting_Started
Try starting with the racing game example for the racing game, not the fps example.
10/30/2006 (7:09 pm)
Not sure if you are aware of this or not, but the model requirements for 'vehicles' and 'players' is different. You can't just swap a dts model designed for a player to a dts model designed for a vehicle. The required nodes are different.http://tdn.garagegames.com/wiki/DTS/Getting_Started
Try starting with the racing game example for the racing game, not the fps example.
#8
10/30/2006 (7:46 pm)
Quentin you just need to define a player datablock called "BoxCar".
Associate David Montgomery-Blake
David MontgomeryBlake
2. Convert it to DTS. This requires a 3D application with a DTS exporter.
3. Change the datablock for the player to point to your model.