HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: [Resolved] CharacterPanel GUI  (Read 2142 times)

Tythin4

  • General Accounts
  • *
  • Posts: 39
    • View Profile
[Resolved] CharacterPanel GUI
« 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.

Thanks
« Last Edit: Nov 01, 12, 10:40:04 AM by HE-Cooper »
Logged

TGSRofar

  • General Accounts
  • *
  • Posts: 153
    • View Profile
Re: CharacterPanelGUI
« Reply #1 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()
Logged
Ron Farrell
Lead Programmer
Triad Game Studios

Tythin4

  • General Accounts
  • *
  • Posts: 39
    • View Profile
Re: CharacterPanelGUI
« Reply #2 on: Nov 19, 11, 07:44:01 AM »

Thank you  :) I will test this out tonight to see what I can get to work
Logged