Datablock PlayerData
by Fucifer · in Torque Game Engine · 06/17/2006 (9:29 am) · 5 replies
I have try some resource but so far none of them work. I did search and try some more but no luck. I have to copy about 150 lines in the Player.cs, the datablock PlayerData and rename it to datablock TomData. Then change the dts line. I am doing so I can have different AI bots. I was wondering is there a better way to do this then copy all them lines? What I want to do is have few lines so it will copy datablock? Thanks.
#3
06/19/2006 (9:48 pm)
Probably something like "This : That" and "className = "That";". Hooray for faked inheritance! Do make sure you learn it. I once saw a project that didn't understand that concept and copy pasted the crossbow for all their weapons... what a nightmare that codebase was ~.~
#4
06/19/2006 (10:03 pm)
Heh...have you been peeking at my codebase, Paul? =)
#5
datablock PlayerData (GreenyPlayer : PlayerBody)
{
shapeFile = "~/data/shapes/greeny/greeny.dts";
};
I am try to track this down, I dont remember what did for this to work but If you have two AIGuard in same mission file they will have different weapons and will switch weapons when they respawn from death.
06/20/2006 (8:30 am)
This the code here, I was looking around in newbie tutorial I had try this before but it would not work. The problem was in the AIGuard code which turn out to be one change. This will copy the player datablock in the player.cs. I used the AIGuard code to determine the weapons and other properties.datablock PlayerData (GreenyPlayer : PlayerBody)
{
shapeFile = "~/data/shapes/greeny/greeny.dts";
};
I am try to track this down, I dont remember what did for this to work but If you have two AIGuard in same mission file they will have different weapons and will switch weapons when they respawn from death.
Torque Owner Fucifer