Quickest way to get GameInfo from an Object?

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

aardvarkk

New Member
May 7, 2004
64
0
0
I'm working on a GUI and I want to change options in my current GameInfo subclass from the GUIPage. The problem is that obviously Level.Game does not exist in Object subclasses like GUIPage.

Just wondering if I could do something other than a foreach (AllObjects?) gig to find the GameInfo...

Thanks!
 
Last edited:

MKhaos7

Member of Clan |UED|
Apr 14, 2004
37
0
0
43
Brasil
If you are talking about a ingame hud, i tihnk that you can get it using the LocalController (or soemthing like that, i've seen it in someplace, but don't remember right now :( )

If you are in a state where the game is not loaded you probably have to change the default properties of the gameinfo and use a staticSaveConfig to save them to the ini.
 

aardvarkk

New Member
May 7, 2004
64
0
0
this is an ingame hud -- sorry, i should have mentioned that.

perhaps you're referring to the GUIController, but i couldn't find anything useful there...
 

MKhaos7

Member of Clan |UED|
Apr 14, 2004
37
0
0
43
Brasil
There you go...

Code:
class GUIComponent extends GUI
	Abstract
    Native;

native(812) final function PlayerController PlayerOwner();

that what i was talking about ;)
It is used in the InitComponent of UT2K4MidGameMenu, so i think thats it.
 

aardvarkk

New Member
May 7, 2004
64
0
0
PlayerOwner() seems to be returning None all the time. What are the requirements for a GUI to have an owner set?

Reading the comments in the Interaction class implies that ViewportOwner (which eventually gives its data to PlayerOwner() ) will contain None if the Player that's being controlled is "Global". How can I stop a Player from being Global?
 
Last edited: