HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.
Pages: 1 [2]

Author Topic: [Resolved] changing character selection area  (Read 2509 times)

HE-Cooper

  • *****
  • Posts: 2221
    • View Profile
Re: [Resolved] changing character selection area
« Reply #15 on: Jan 22, 13, 10:54:51 AM »

Now you're going to confuse them. I'm trying to keep it simple:

Here's the simple breakdown: if you already have a character loaded and playing, then room selection is automatic and you're all good (don't worry about character or camera selecting room). In the character selection area, you'll need to use code to automatically select a room if you want to display assets. Use the reference worlds to see examples.
Logged

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: [Resolved] changing character selection area
« Reply #16 on: Jan 22, 13, 10:56:39 AM »

Dwight beat me to this, but I'll post it anyways: :D

Cooper was mostly correct.  But of course, if activation of rooms required a character to be selected at the time of being in the character select area, then rooms could never be activated there.

A while back I asked about room selection on these forums and was it was explained thusly:

a room gets activated not based on the character's position but in fact the position of the active camera.  I realized that when I would swing the orbiting camera around a character and the room would change.  It was because as the camera moved around my character, it moved from being over one heightmap to another, each of which was in a different room.

However, that automatic selection of rooms does not get switched on until the client external function AutoSelectRooms() is called.  In the clean engine code, that is not called until in unique method _Area_Load() of the4 _BaseClient class when one loads into another area with a character selected.  Once that happens, auto room selection is on for the remainder of the client session.  This means that if you are first in the character selection area, no room selection, but if you log in with a character to another area, then return to the character select area, THEN rooms will be activated.

So, by default, you need to first log in with a character before rooms get activated, but having a character selected in the character select room is not required.



What both HJRef and our world does is call AutoSelectRooms() earlier.  For instance, we call in in the function which opens our CSS gui.  That way, room selection is available when you first log in to the world, even before first selecting a character.
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

craigbe

  • Developers
  • *
  • Posts: 69
    • View Profile
Re: [Resolved] changing character selection area
« Reply #17 on: Jan 22, 13, 11:09:33 AM »

Thanks Scott!   I have a lot more reading to do.
Logged
Pages: 1 [2]