My bots dont work with the HEAD version... what did GG do?
by Josh Albrecht · in Torque Game Engine · 12/20/2001 (4:06 pm) · 6 replies
My bots worked perfectly in versions 1.0 and 1.1, but after I updated to the HEAD (to get the milkshape exporter, a great thing btw), the bots stopped working.
I dont think it is a code problem because my newest exe works with someone else's scripts, and since they have my bots scripts, the bots work perfectly for them.
I have followed the execution of the bot functions through to the end, which appears to be this:
function GameConnection::createPlayer(%this, %spawnPoint)
{
if (%this.player > 0) {
// The client should not have a player currently
// assigned. Assigning a new one could result in
// a player ghost.
error( "Attempting to create an angus ghost!" );
}
// Create the player object
%player = new Player() {
dataBlock = LightMaleHumanArmor;
client = %this;
};
MissionCleanup.add(%player);
// Player setup...
%player.setTransform(%spawnPoint);
%player.setEnergyLevel(60);
%player.setShapeName(%this.name);
// Update the camera to start with the player
%this.camera.setTransform(%player.getEyeTransform());
// Give the client control of the player
%this.player = %player;
%this.setControlObject(%player);
echo("JOSH: The create player function is done");
}
Up to this point, the Ai does pretty much everything the player does. Also, everything looks the same in each of the previous functions (I compared the functions to the old ones, the 1.1 version). However, no bot spawns. What functions are called here? Should the bot be spawned here? Is there something wrong? Why do my bots not work... ? :(
I dont think it is a code problem because my newest exe works with someone else's scripts, and since they have my bots scripts, the bots work perfectly for them.
I have followed the execution of the bot functions through to the end, which appears to be this:
function GameConnection::createPlayer(%this, %spawnPoint)
{
if (%this.player > 0) {
// The client should not have a player currently
// assigned. Assigning a new one could result in
// a player ghost.
error( "Attempting to create an angus ghost!" );
}
// Create the player object
%player = new Player() {
dataBlock = LightMaleHumanArmor;
client = %this;
};
MissionCleanup.add(%player);
// Player setup...
%player.setTransform(%spawnPoint);
%player.setEnergyLevel(60);
%player.setShapeName(%this.name);
// Update the camera to start with the player
%this.camera.setTransform(%player.getEyeTransform());
// Give the client control of the player
%this.player = %player;
%this.setControlObject(%player);
echo("JOSH: The create player function is done");
}
Up to this point, the Ai does pretty much everything the player does. Also, everything looks the same in each of the previous functions (I compared the functions to the old ones, the 1.1 version). However, no bot spawns. What functions are called here? Should the bot be spawned here? Is there something wrong? Why do my bots not work... ? :(
#2
I believe it is in fact a problem with my player model. WHY my milkshape-exported player model cant be used as a bot is anyone's guess. I will keep you guys posted... maybe there is a problem with the exporter or something, though I bet it is probably just some irritating little mistake I made.
Thanks for the suggestion clocks! :)
12/20/2001 (6:24 pm)
Edit:I believe it is in fact a problem with my player model. WHY my milkshape-exported player model cant be used as a bot is anyone's guess. I will keep you guys posted... maybe there is a problem with the exporter or something, though I bet it is probably just some irritating little mistake I made.
Thanks for the suggestion clocks! :)
#3
Also, I believe that I figured out why my bots dont appear. I can get the normal player to spawn, but my model does not. So there has to be something wrong with the Milkshape model. The way it's done now, a player is created, then transformed to whever he is to spawn. I believe that torque probably uses some specific model node that I dont have on my model, since it comes from milkshape. Can anyone think of any other reasons why? Is this true GG?
Thanks for any help guys! :)
12/21/2001 (2:47 pm)
Well, they DID change something important. It seems like some player spawn-type functions were changed from Player:: to GameConnection:: but I never saw that in teh changelog.Also, I believe that I figured out why my bots dont appear. I can get the normal player to spawn, but my model does not. So there has to be something wrong with the Milkshape model. The way it's done now, a player is created, then transformed to whever he is to spawn. I believe that torque probably uses some specific model node that I dont have on my model, since it comes from milkshape. Can anyone think of any other reasons why? Is this true GG?
Thanks for any help guys! :)
#4
12/21/2001 (4:08 pm)
Player models do have to have a number of specific nodes and animations to load properly. I'm working on an example MilkShape player, I'll check it in within the next day or so.
#5
And while your here.... :) Could you get those collision details working for the ms2dts exporter too? That would be nice... :)
12/22/2001 (9:23 am)
Cool, thanks alot Tim!And while your here.... :) Could you get those collision details working for the ms2dts exporter too? That would be nice... :)
#6
12/22/2001 (9:56 am)
The MS exporter already has support for a single collision detail mesh. Allowing for more than one is a task on my list.
Torque Owner Karsten "Clocks" Viese
I don't know if its going to help you but after I added
./
To the paths in the shapes/player/player.cs infront of all the animation sequences it worked again.
So maybe your problem could be related to some change in a path somewhere?.
// Clocks out