HeroEngine Forums

HeroEngine Support => GUI Creation => Topic started by: Tythin4 on Nov 18, 11, 07:21:28 PM

Title: [Resolved] CharacterPanel GUI
Post by: Tythin4 on Nov 18, 11, 07:21:28 PM
Hi, I created a gui that displays the character's name, level, exp and stuff like that and I get it to work when It opens when the character enters the area.  I'm trying to attach it to a keybinding and I can get it to open when the user presses "I" but I cant find a way for it to grab the character data and display it.

Do I make a noderef of the Character's class and use getAccountID() or something?

To be clear on what I'm asking, how do I get a reference to the character though a script that is not related to that character such as a GUI.

Title: Re: CharacterPanelGUI
Post by: TGSRofar on Nov 19, 11, 07:12:14 AM
There are multiple ways to get the player character node on the client.

SYSTEM.INFO.PLAYERCHARACTER resolves to the character noderef.

There is an external function GetPlayerCharacterNode() also.

Another option is something like this...

Code: [Select]
 player as NodeRef of Class _PlayerAccount = GetAccountID()
  var character = player.GetMyCharacter()
Title: Re: CharacterPanelGUI
Post by: Tythin4 on Nov 19, 11, 07:44:01 AM
Thank you  :) I will test this out tonight to see what I can get to work