Problem for advanced TGE users......
by Michael Schaumburg · in Torque Game Engine · 12/09/2002 (6:10 am) · 7 replies
I think the following is realy hard to understand and to solve, but I have no more idea, since I tried a lot.
I'm adding my NPC's with the mission editor. There are now two independent classes. The player class and the NPC class. When I start a mission, all seems ok. The player is animated and the NPC also. Just looking fine when the NPC is attacking the player. The player and the NPC are different. They have their own .cs file with the animation informations.
For the player:
For the NPC:
And they have their own file to define the class and the rest.
For the player:
For the NPC:
If anybody has an idea, I'm realy happy .....
I'm adding my NPC's with the mission editor. There are now two independent classes. The player class and the NPC class. When I start a mission, all seems ok. The player is animated and the NPC also. Just looking fine when the NPC is attacking the player. The player and the NPC are different. They have their own .cs file with the animation informations.
For the player:
datablock TSShapeConstructor(PlayerDts)
{
baseShape = "./player.dts";
sequence0 = "./player_root.dsq root";
sequence1 = "./player_forward.dsq run";
sequence2 = "./player_back.dsq back";
sequence3 = "./player_side.dsq side";
and so on.....For the NPC:
datablock TSShapeConstructor(PlayerDts)
{
baseShape = "./goove.dts";
sequence0 = "./player_root.dsq root";
sequence1 = "./player_forward.dsq run";
sequence2 = "./player_back.dsq back";
sequence3 = "./player_side.dsq side";
sequence4 = "./player_lookde.dsq look";
and so on.....And they have their own file to define the class and the rest.
For the player:
// Load dts shapes and merge animations
exec("~/data/shapes/player/player.cs");
// Timeouts for corpse deletion.
$CorpseTimeoutValue = 22 * 1000;
// Damage Rate for entering Liquid
$DamageLava = 0.01;
$DamageHotLava = 0.01;
$DamageCrustyLava = 0.01;
and so on........For the NPC:
// Load dts shapes and merge animations
exec("~/data/shapes/player/goove.cs");
// Timeouts for corpse deletion.
$CorpseTimeoutValue = 22 * 1000;
// Damage Rate for entering Liquid
$DamageLava = 0.01;
$DamageHotLava = 0.01;
$DamageCrustyLava = 0.01;
and so on........Now if I start a multiplayer LAN game with two pc's, on the server it seems all ok, the two players are animated and the NPC too. But on the client the two players aren't animated, only the NPC's have their animation. I know that the files above are only started at the server, but how I can get the players animated on the client ?? I tried to start these files on the client during missionDownload but that doesn't help.If anybody has an idea, I'm realy happy .....
#2
12/09/2002 (7:13 am)
I echo Melv's comments, looks like you named the DataBlocks the same...
#3
NPC dataBlock is:
The animation file goove.cs in shapes/player is:
Player dataBlock is:
Is there a mistake ???? Please understand me correct, the NPC and the player are not the same models!!
12/09/2002 (7:35 am)
Sorry I think I must post the complete blocks in case I can't find a mistake:NPC dataBlock is:
datablock PlayerData(DefaultNPCArmor)
{
renderFirstPerson = false;
emap = true;
//className = Armor;
shapeFile = "~/data/shapes/player/goove.dts";
cameraMaxDist = 3;
computeCRC = true;
canObserve = true;
//cmdCategory = "Clients";
cameraDefaultFov = 90.0;
cameraMinFov = 5.0;
cameraMaxFov = 120.0;
debrisShapeName = "~/data/shapes/player/debris_player.dts";
......
......
};
datablock PlayerData(NPCArmor : DefaultNPCArmor) // NPCArmor beinhaltet auch die Klasse DefaultArmor
{
className = NPC;
Category = "NPC";
cmdCategory = "NPCs";
name = "Goove";
};The animation file goove.cs in shapes/player is:
datablock TSShapeConstructor(PlayerDts)
{
baseShape = "./goove.dts";
sequence0 = "./player_root.dsq root";
sequence1 = "./player_forward.dsq run";
sequence2 = "./player_back.dsq back";
sequence3 = "./player_side.dsq side";
sequence4 = "./player_lookde.dsq look";
sequence5 = "./player_head.dsq head";
sequence6 = "./player_fall.dsq fall";
sequence7 = "./player_land.dsq land";
sequence8 = "./player_jump.dsq jump";
sequence9 = "./player_diehead.dsq death1";
sequence10 = "./player_diechest.dsq death2";
sequence11 = "./player_dieback.dsq death3";
sequence12 = "./player_diesidelf.dsq death4";
sequence13 = "./player_diesidert.dsq death5";
.....
.....
};Player dataBlock is:
datablock PlayerData(DefaultArmor)
{
renderFirstPerson = false;
emap = true;
//className = Armor;
shapeFile = "~/data/shapes/player/spears.dts";
cameraMaxDist = 3;
computeCRC = true;
canObserve = true;
cmdCategory = "Clients";
cameraDefaultFov = 90.0;
cameraMinFov = 5.0;
cameraMaxFov = 120.0;
debrisShapeName = "~/data/shapes/player/debris_player.dts";
debris = playerDebris;
......
......
datablock PlayerData(PlayerArmor : DefaultArmor) // PlayerArmor beinhaltet auch die Klasse DefaultArmor
{
className = Armor;
cmdCategory = "Clients";
};
And the animation file in shapes/player
datablock TSShapeConstructor(PlayerDts)
{
baseShape = "./spears.dts";
sequence0 = "./player_root.dsq root";
sequence1 = "./player_forward.dsq run";
sequence2 = "./player_back.dsq back";
sequence3 = "./player_side.dsq side";
sequence4 = "./player_lookde.dsq look";
sequence5 = "./player_head.dsq head";
sequence6 = "./player_fall.dsq fall";
sequence7 = "./player_land.dsq land";
sequence8 = "./player_jump.dsq jump";
sequence9 = "./player_diehead.dsq death1";
sequence10 = "./player_diechest.dsq death2";
.....
.....Is there a mistake ???? Please understand me correct, the NPC and the player are not the same models!!
#4
the line:
so maybe you should try and change that (the "PlayerDts")...
12/09/2002 (8:04 am)
I think what both of the guys were trying to say was thatthe line:
datablock TSShapeConstructor(PlayerDts)is the SAME for both classes / models...
so maybe you should try and change that (the "PlayerDts")...
#5
Thanks a lot guys......
12/09/2002 (8:16 am)
Like always Stefan, you help me quick. I was thinking that it is a fixed classname PlayerDts. When I changed it in the NPC file, all my models are animated. Thanks a lot guys......
#6
12/09/2002 (8:25 am)
glad to be of assistance!
Associate Melv May
- Melv.