Duck/prone & schedule
by mb · in Torque Game Engine · 10/09/2006 (7:15 am) · 0 replies
thanks in advance :D
1. Can duck/prone be coded without editing the engine code?
2. How can I call a function from schedule that is using a class? The only way I 've been able to get schedule to work is by calling generic functions & then call the function in a class. I want to be able to call GameConnection::spawnPlayer. People have said use %this.schedule(1000,0,spawnPlayer) but this does not work for me. Also tried %this.player.schedule, and many other ways... schedule(1000,0,%this.player.spawnPlayer) . I've tried many variations and none worked.
The only way I've been able to call it is by scheduling another function and calling spawnPlayer from there like:
example:
function GameConnection::someFunction
{
...
schedule(1000,0, callSpawn, %this)
}
function callSpawn(%this)
{
%this.player.spawnPlayer(%this)
}
Is this the right way to do this? Will I lose any info? Is there another way, and what is it?
1. Can duck/prone be coded without editing the engine code?
2. How can I call a function from schedule that is using a class? The only way I 've been able to get schedule to work is by calling generic functions & then call the function in a class. I want to be able to call GameConnection::spawnPlayer. People have said use %this.schedule(1000,0,spawnPlayer) but this does not work for me. Also tried %this.player.schedule, and many other ways... schedule(1000,0,%this.player.spawnPlayer) . I've tried many variations and none worked.
The only way I've been able to call it is by scheduling another function and calling spawnPlayer from there like:
example:
function GameConnection::someFunction
{
...
schedule(1000,0, callSpawn, %this)
}
function callSpawn(%this)
{
%this.player.spawnPlayer(%this)
}
Is this the right way to do this? Will I lose any info? Is there another way, and what is it?