Game Development Community

To many templates bug?

by Stephen Howe · in TGB Platformer Kit · 04/07/2008 (5:52 am) · 3 replies

All I did was add a new template to "datablocks.cs" (BobTemplate)& this happened:

img354.imageshack.us/img354/5484/templatebugsb2.th.jpg


I added the following code:
datablock t2dSceneObjectDatablock(BobTemplate)
{
	Class				= "PlayerClass";
	Size				= "17.000 13.000";
	Layer				= "1";
	CollisionPolyList	= "-0.167 -0.820 0.167 -0.820 0.162 0.499 0.000 0.853 -0.167 0.512";
	_Behavior0			= "ActorBehavior";
	_Behavior1			= "ControllerBehavior";
	_Behavior2			= "ActorAnimationBehavior	DatablockPrefix	Bob	ScaleVolume	0";
};

@ end of file:
if ($managedDatablockSet.isMember(BobTemplate)) $managedDatablockSet.remove(BobTemplate);
$managedDatablockSet.add(BobTemplate);

I left all the dragon template in the file too.

It works fine in the editor & when I run the game & all the templates seem to run the same thing, it's just strange.

#1
04/07/2008 (12:38 pm)
Really? That is a bit odd.

If a problem like that persists, try using common features between objects and then just modify certain values when you need to. For example, if you have 3 characters all using the same information except their datablock prefix is different, just change it in the editor. Just a thought.

Maybe you should throw this into the TGB bug forums as well.
#2
04/07/2008 (7:35 pm)
So I can apply the animation manager (or other behaviors) to spawners & it will use the editor-assigned behavior vs the one in the datablock?.
#3
07/24/2008 (5:01 am)
Hello,
I have the same problem except I did not add anything to datablocks.cs. How can I fix this?