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:

I added the following code:
@ end of file:
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.

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.
Associate Phillip O'Shea
Violent Tulip
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.