Game Development Community

Object doesnt follow the path ?

by Vlad I · in Torque Game Builder · 10/20/2011 (8:54 am) · 0 replies

I attach my object which doesnt follow the path after onWorldLimit, it stays on node 1. Console doenst show any error. Why?

function Spider::onLevelLoaded(%this, %scenegraph)
{
%this.spawn();
}

function Spider::spawn(%this)
{
pathA.attachObject(SpiderA, 10, 1, 1, 3, "wrap", -1, true);
}

function Spider::onWorldLimit(%this, %mode, %limit)
{
if (%limit $= "top")
{
%this.spawn();
}
}