Hey, first off, I'll admit I'm new to UDK, so this is probably a very simple question.
Anyways, I'm trying to make a game in which players have an energy variable they need to maintain along with health. This is the code that I have in my pawn class, and when I use Kismet's Get Property, with either energyMax, or energy, I can get a value for the custom property.
However when I try to use these variables in my HUD, I get the error "Error, Unrecognized member 'Energy' in class 'Pawn' Below is the line of code from my HUD that tries to use the energy variable.Code:class HGPawn extends UTPawn; var int energy; var int energyMax; simulated event PostBeginPlay() { super.PostBeginPlay(); energyMax=100; energy=100; }
If anyone has any advice, it would be greatly appreciated. Thanks in advance.Code:Canvas.DrawTextCentered(PlayerOwner.Pawn.Energy);



Reply With Quote
![Send a message via ICQ to Blade[UG]](images/styles/TwistedDark/misc/im_icq.gif)
![Send a message via AIM to Blade[UG]](images/styles/TwistedDark/misc/im_aim.gif)
![Send a message via MSN to Blade[UG]](images/styles/TwistedDark/misc/im_msn.gif)
![Send a message via Yahoo to Blade[UG]](images/styles/TwistedDark/misc/im_yahoo.gif)



Bookmarks