Game Development Community

Override script object method in package

by Orion Elenzil · in Torque Game Engine · 02/08/2006 (5:27 pm) · 2 replies

Howdy!

i've got a script package which i want to override a method of a script object,
but call the previous method as well.

it's clearer in code - ;)

how do i make this do what i want ?

package myPackage {

// ...

function GameConnection::myInit(%this)
{
   %this.Parent::myInit();                 // syntax error.
   Parent::GameConnection::myInit(%this);  // syntax error.

   // do more stuff.
}

// ...

};


thanks in advance.

#1
02/09/2006 (6:41 am)
It's Parent::functionName():

package myPackage {
function GameConnection::myInit(%this)
{
   Parent::myInit(%this); //This is the right way to do it
}
#2
02/09/2006 (8:07 am)
Many thanks, manoel !