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

Author Topic: [Resolved] GUI load question  (Read 923 times)

Drakuel

  • World Owners
  • ****
  • Posts: 26
  • President
    • View Profile
[Resolved] GUI load question
« on: Jul 15, 12, 09:14:51 AM »

Okay we understand how to build gui prototypes and use script to build them and render them etc.. We sorta understand when they actually get called in the loading of the related classes, for example character select, character creation..

However after changing the character creation area and setting a create new player in the ccs to this new area, our own custom character creation gui's display just fine, as the script says.. However the game GUI's also display,  there is nothing in script for character creation that calls those.. SO my question is , how does the engine determine what to display and when, is it using the camera, the area, and the classes?

If it just uses the classes than it makes no sense as to why our game gui's are popping on character creation screens, there is no calls for them yet..

If it is tied to the camera's like game, than I do notice when creating a character it does put you in game mode automatically.. This was one thought we had but wasn't sure..

If the area, we just do not understand that at all and not make sense unless you purposely glued the gui to it..
« Last Edit: Nov 01, 12, 02:35:16 PM by HE-Cooper »
Logged
Thanks,
Dan Petty
Draconian Studio's LLC

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: GUI load question
« Reply #1 on: Jul 15, 12, 01:26:40 PM »

If it appears, then it must have been created somewhere at some time. Either it is getting created when you enter that area, or it was created previously and not removed.

Search through all scripts (ctrl-shift-A) for the name of your game gui prototype.  Chances are it is only getting created in one place, depending on how much you have customized things.  From there, you can trace back to see how/when/why it gets created, which hopefully gives you some insight into what is going on.

It is difficult to be more specific, as it really depends on what your codebase looks like right now.
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

Drakuel

  • World Owners
  • ****
  • Posts: 26
  • President
    • View Profile
Re: GUI load question
« Reply #2 on: Jul 15, 12, 06:12:59 PM »

Thanks for feedback..

Yes it is only created once, within client E_playeraccountclassmethods.. However I was correct in thinking it uses area's to either show or not show the game gui's.. That is the part we didn't understand and it is not very well documented..

In any case basically in E_playeraccountclassmethods, it does a check on areaid if it equals your charactercreation areaid, than it returns false and ends script.. If it doesn't equal that, it calls the game  Gui creation methods within the script thus building your game gui's on screen..

So once we finally realized this after day's of searching, it was a simple areaid replacement to stop them from showing within our character creation area..
Logged
Thanks,
Dan Petty
Draconian Studio's LLC

Trixer

  • General Accounts
  • *
  • Posts: 26
    • View Profile
Re: GUI load question
« Reply #3 on: Jul 17, 12, 09:46:12 AM »

Areas are what show up GUIs, so one thing to remember is if you are using the "Default" character creation area you need to change what GUI shows up there...


This is very useful for many reasons if you think about. For instance in a town maybe you dont need to show a skill bar if a player cant be fighting, or something like that. It also allows for "mini game" zones, that allows the UI to change for say "egg hunting" during an Easter event or something of that nature.

Modify your character creation zone, to only show up your GUI :)

This tricked us up at first too, the thought of areas loading UI elements to me was insane, and then I really got to thinking about it and I was like "GENIUS!"
Logged
Lead Programmer and Technical Engineer for Harmonex Neuro Science Research Inc.