Hi all,
So my heirarchy looks something like this.
class MyPawn extends Pawn;
function Foo()
{ ... }
class MyPlayerPawn extends MyPawn;
function Foo()
{ ... }
class MyPlayerController extends PlayerController;
MyPlayerController's 'Pawn' member variable is referencing a MyPlayerPawn type.
Here is my problem:
I'm trying get the Controller's Pawn (Pawn is referencing a MyPlayerPawn type) variable to call an overridden function that is defined both in MyPawn and in MyPlayerPawn. In this case I want to call the MyPawn version of the function Foo(). Or the function one class up in my heirarchy.
I tried using 'super' but UCC complains that super can only be used with self or within the scope of the class where it is being used.
I current have this line of code in MyPlayerController's code:
MyPawn(Pawn).Foo();
But this line of code ends up calling MyPlayerPawn's version of Foo() not MyPawn's version of Foo(). I want it to call MyPawn's version.
What syntax do I use to get it to call MyPawn's version of the function?
Thanks!
So my heirarchy looks something like this.
class MyPawn extends Pawn;
function Foo()
{ ... }
class MyPlayerPawn extends MyPawn;
function Foo()
{ ... }
class MyPlayerController extends PlayerController;
MyPlayerController's 'Pawn' member variable is referencing a MyPlayerPawn type.
Here is my problem:
I'm trying get the Controller's Pawn (Pawn is referencing a MyPlayerPawn type) variable to call an overridden function that is defined both in MyPawn and in MyPlayerPawn. In this case I want to call the MyPawn version of the function Foo(). Or the function one class up in my heirarchy.
I tried using 'super' but UCC complains that super can only be used with self or within the scope of the class where it is being used.
I current have this line of code in MyPlayerController's code:
MyPawn(Pawn).Foo();
But this line of code ends up calling MyPlayerPawn's version of Foo() not MyPawn's version of Foo(). I want it to call MyPawn's version.
What syntax do I use to get it to call MyPawn's version of the function?
Thanks!
Comment