Game Development Community

BUG? Beta 2: onWorldLimit never fires?

by Jason Cahill · in Torque Game Builder · 05/03/2006 (2:52 pm) · 3 replies

The following code never seems to fire:

function t2dSceneObject::onWorldLimit(%srcObj, %limitMode, %limit)
{
   echo("WORLD LIMIT!");
}

Even though I have a number of sprites set with:

%sprite.setWorldLimit(bounce, "-47.5 -29.5 47.5 34.5");

And the sprites do, in fact, work and bounce at the world limits... anyone have this working?

#1
05/03/2006 (3:11 pm)
Hmm, I've had onWorldLimit working with classes.
#2
05/03/2006 (4:30 pm)
You need true at the end to tell it to call the callback.

%sprite.setWorldLimit(bounce, "-47.5 -29.5 47.5 34.5"[b], true[/b]);
#3
05/03/2006 (10:02 pm)
Tom! Thanks a bunch, I totally missed that.