package Print
{
function gameConnection::onClientEnterGame(%client)
{
Parent::onClientEnterGame(%client);
%client.centerPrint("message", "time");
}
};
activatePackage(Print);
This should work.
It would not.
Use
this:
package print
{
function gameConnection::onClientEnterGame(%this)
{
Parent::onClientEnterGame(%this);
commandToClient(%this,'centerPrint',"Message",int time);
}
};
activatePackage(print);
1.
You cannot replace %this with whatever you want. It seems you can but it is not good practice.
2. .centerPrint is not a method of a GameConnection, therefore would not work