Config Datablocks Templates in 1.5
by Will Robinson · in Torque Game Builder · 09/02/2007 (3:57 pm) · 4 replies
I'm trying to do the advanced platformer --> change levels in 1.5 and it uses the following code:
if(!isObject(LevelEndTargetTemplate)) new t2dSceneObjectDatablock(LevelEndTargetTemplate)
{
// An instances of this class presents a target which the player must make
// physical contact with in order to switch to the next level.
class="LevelEndTargetClass";
nextLevel="baseLevel.t2d";
CollisionActiveSend = "1";
CollisionActiveReceive = "1";
CollisionCallback = "1";
CollisionPhysicsSend = "0";
CollisionPhysicsReceive = "0";
};
I put the code at the end of main.cs and nothing happens in 1.5, in 1.3 it loads the template.
if(!isObject(LevelEndTargetTemplate)) new t2dSceneObjectDatablock(LevelEndTargetTemplate)
{
// An instances of this class presents a target which the player must make
// physical contact with in order to switch to the next level.
class="LevelEndTargetClass";
nextLevel="baseLevel.t2d";
CollisionActiveSend = "1";
CollisionActiveReceive = "1";
CollisionCallback = "1";
CollisionPhysicsSend = "0";
CollisionPhysicsReceive = "0";
};
I put the code at the end of main.cs and nothing happens in 1.5, in 1.3 it loads the template.
About the author
#2
09/03/2007 (12:22 pm)
Im trying to add the LevelEndTargetTemplate in to the level editor under config datablock. the above code when you add it to main.cs in tgb 1.3 shows the template, when you do the same in tgb 1.5 it wont show up...
#3
09/03/2007 (7:31 pm)
Well as you have found out it doesn't work that way anymore, reread my last post. That is where it has to be if you want it to show up in the editor.
#4
09/04/2007 (6:54 am)
Thankyou for your help i added it to datablocks.cs and it showed up..
Associate James Ford
Sickhead Games