dim3 Forum

Full Version: randomness and chains
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Could calling to many random APIs stop them from returning anything? I'm using quite a few random numbers for my API, not ALOT, but this won't work:
Code:
....
    obj.event.chain(utility.random.getInteger(5,10),'fyTrooperFinishMove');
....
function fyTrooperFinishMove(obj)
{
    iface.console.write('finish');
    obj.motionVector.stop();
    obj.motionVector.turnToObject(victim);
    mood='attack';
    
    obj.model.animation.index=0;
    obj.model.animation.start('idle ready');
    
    fyTrooperFire(obj);
}
It never gets to the finish move function :|.
You can only have one control path at a time, so if you are launching a second chain before that one fires, then it would never get called. You might want to put a console write before you call the chain and then one in the function it calls to make sure it's getting where you expect it.

[>] Brian
Thanks!
Reference URL's