Announcement

Collapse
No announcement yet.

Can Game Modes talk to each other?

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

    Can Game Modes talk to each other?

    I have a game with multiple game modes and I would like to keep it that way. However save data like XP is in the first game mode while highscore is in the second game mode. I would like to give XP while in a map using the second game mode, likewise I would like to look up the high score while in a map with the second game mode. Would an interface allow me to achieve this result?

    #2
    Look into the game instance class.
    Rule#21: Be polite, be professional, but have a plan to kill everyone you meet.

    Comment


      #3
      Only one gamemode can be active at the same time. So using interfaces or whatever wont work. As Kris suggested, look at the game instance class. This is a class which remains active during the entire life time of the game (from start until the application is closed). You can create a new blueprint class which inherits the default game instance class, so you can add your own properties and logic. Dont forget to set your newly created game instance class in the project settings!
      Lets Measure It
      Blueprints to measure distances, area's, circumferences and routes/paths. Check out the marketplace: https://www.unrealengine.com/marketp...ets-measure-it

      Comment

      Working...
      X