Game Development Community

The next level

by Bruce Slabinski · in Technical Issues · 01/02/2007 (5:38 pm) · 8 replies

Does anyone know how to make it so that when a collision happens it moves onto the next level?

The script that I have so far is...

function Goal1::onLevelLoaded(%this, %scenegraph)
{

goal_1 = %this;

setCollisionResponse(loadLevel(%level_2.t2d))
}


My console says that the bold line isn't right. Can someone help me?

And i'm using T2D not TGE

#1
01/02/2007 (5:47 pm)
Hello?
#2
01/02/2007 (6:21 pm)
You wont normally get a reply in 9 minutes, be patient.
#3
01/02/2007 (6:55 pm)
Hi.

What's the particular error? Don't you need a semicolon at the end?
#4
01/03/2007 (12:18 pm)
So i need

function Goal1::onLevelLoaded(%this, %scenegraph)
{

goal_1 = %this;

setCollisionResponse(loadLevel(%level_2.t2d));
}

is this correct?
#5
01/03/2007 (12:57 pm)
Well it says this:

Error, cannot unlink namespace parent linkage for goal1 for t2dTrigger.
Error: cannot change namespace parent linkage for Goal_1 from t2dStaticSprite to t2dTrigger.
#6
01/03/2007 (3:39 pm)
Well what if I do this:

function Goal1::onLevelLoaded(%this, %scenegraph)
{

goal_1 = %this;
levelLoaded(Level_2.t2d) = %mode;

setCollisionResponse(%mode);
}


I'm not sure if this will work (and I really doubt it because my other plans failed) but I'll try
#7
01/03/2007 (5:28 pm)
First of all, I don't own TGB, so I wouldn't know.

Second of all, you would have better luck in the TGB forums.
#8
01/03/2007 (6:13 pm)
Ohh i thought this was tgb lol