Announcement

Collapse
No announcement yet.

Looking for a simple game restart on keypress, or after player death. UDK script base

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

    Looking for a simple game restart on keypress, or after player death. UDK script base

    Hello all,
    I'm looking for a simple way or restarting the level/map by pressign a key or after the player dies. I've looked about and found that "RestartMap" is a UT command, and RestartLevel seems to be a server side function. My code/classes all use a UDK base code so UT commands wont work.

    I also played with bRestartLevel within my gameinfo and that does not seem to work.

    Does anyone have any ideas here? I would like to set a function that resets the game that can be placed into a key binding.

    Please help?

    Thank you in advance.

    #2
    Probably hacky, but in my game for my Restart button I used:

    Code:
    ConsoleCommand("open " $ WorldInfo.GetMapName(true));
    Essentially what this does is just reloads the entire map. Only issue is it's harder to persist certain things, since this does count as a map change.

    Comment


      #3
      Originally posted by willyg302 View Post
      Probably hacky, but in my game for my Restart button I used:

      Code:
      ConsoleCommand("open " $ WorldInfo.GetMapName(true));
      Essentially what this does is just reloads the entire map. Only issue is it's harder to persist certain things, since this does count as a map change.


      This does work for my purposes right now. Thank you!

      Comment

      Working...
      X