Announcement

Collapse
No announcement yet.

GameInfo at a GUI?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    GameInfo at a GUI?

    Ok...
    the question may sounds a bit weird, but the fact is that I'm writing a Campaign thing for UT and i need to save a list of maps and other configs for a custom campaign made by the user.

    To do this i was trying to use DataObjects, but i need a GameInfo thing to use the DataObjects functions (load, save, delete, etc). And i can't access any from the GUI

    So, with that back to the first question: how do i access a gameinfo from a GUI?
    Or even: there is another way to use DataObjects besides with a game info?

    Thanks!

    #2
    You can access the gameinfo from any Actor subclass (Level.Game). Therefor, in your GUI, if you call PlayerOwner() and get your local player controller (which is an Actor subclass), and from there you can access the gameinfo.

    In shorter words: MyGameInfo(PlayerOwner().Level.GameInfo)

    Comment


      #3
      lol
      thanks tons Bonehed
      i knew there was a way to get a controller/level from a GUI but had completely forgotten about PlayerOwner

      works flawless!

      Comment

      Working...
      X