Forward a timer to a class functiion

Started by rulk, Sep 13, 2015, 05:28 PM

Previous topic - Next topic

rulk

Hya chaps

Is it possible to send a timer to a class function?

I keep getting the error "The given timer callback does not exist."

here is what I have been putting....

blah <- NewTimer( "MyClass.MyClassFunction", 50, 0, player );

that's for your help...

rulk
We are all god's children.

.

Simple answer... Nope!

I don't want to get into details because there's no point in doing so.
.

rulk

Quote from: S.L.C on Sep 13, 2015, 05:34 PMSimple answer... Nope!

I don't want to get into details because there's no point in doing so.

ok, thanks chap
We are all god's children.

Xmair


Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD

EK.IceFlake

You can make a function NewClassTimer which calls on another function with vargv and insert and acall which calls on another function and passes the function to call and does compilestring and executes it..

DizzasTeR

Quote from: NE.CrystalBlue on Sep 14, 2015, 02:40 PMYou can make a function NewClassTimer which calls on another function with vargv and insert and acall which calls on another function and passes the function to call and does compilestring and executes it..

You make no sense mate.

Thijn

He's basically saying you can make another function that will call the classes function.

.

Quote from: Thijn on Sep 14, 2015, 05:47 PMHe's basically saying you can make another function that will call the classes function.

You'd still miss the object instance (`this` environment) and calling the function normally would be the same as:
class Test
{
    function Wazzaa(str)
    {
        ::print("class " + str);
    }
}

Test_Wazzaa <- Test.Wazzaa;

Timer <- NewTimer( "Test_Wazzaa", 50, 0, "wazzaaa" );
.

.

.