PDA

View Full Version : where is the player



guineapig
11-14-2009, 06:31 AM
Hi,

Well, I am afraid this is a bunch of questions but I try it that way:

Following the comment in the actor.uc "Location" contains the actual postion of an actor.

But how do I call it in my CustomPlayerController class? The only idea I had was "this" as I was assuming the actor class is somewhere a parent up the way. But "this" doesnt seem to exist at all. Although I doesnt really make sense to me, I also tried actor.Location...nope. Well, and now I dont even have an appraoch left :(

Help :eek:

Regards
guineapig

Blaaguuu
11-14-2009, 06:36 AM
The actual physical character is the 'Pawn' class. If you are extending from the UT3 demo classes, then it would actually be a UTPawn. From within a Controller class, you can access that player's pawn by simply referencing the "Pawn" variable, which contains a reference to the Controller's actual Pawn class.

And if you want to reference a class from within itself, the keyword is "self", not "this".

guineapig
11-15-2009, 09:12 AM
Cool thanks a lot. Cannot tell if it works since I have some other flaws to fix but the compiler throws no error :cool: