Announcement

Collapse
No announcement yet.

Level restart only works once after player death

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

  • replied
    Originally posted by joeycampbell View Post
    Hi - to save time I triggered destroy by the number 4 on the keyboard.
    It destroys the actor once and then refreshes the screen for a split second and restarts the level.
    I added in a print string which works the first time I press 4 but not after the level restarts....after the level restarts and I press 4 nothing happens at all.
    Could it be that the level blueprint is wiped after "open level" ?
    Hm, no. If it is the same level you load, then not. Can you actually control your character after respawning?

    Leave a comment:


  • replied
    Hi - to save time I triggered destroy by the number 4 on the keyboard.
    It destroys the actor once and then refreshes the screen for a split second and restarts the level.
    I added in a print string which works the first time I press 4 but not after the level restarts....after the level restarts and I press 4 nothing happens at all.
    Could it be that the level blueprint is wiped after "open level" ?

    Leave a comment:


  • replied
    So, when the player falls down, you destroy the Actor. Then the "OnDestroyed" is called and it should restart the level, right?

    Could you place a "PrintString" node directly behind the OnDestroyed, to check if it is even called correctly on the second attempt?

    You might want to think about a solution where you just check the Overlap in your Zone that destroy the character and restart the
    game from there. In the end, it would be the same result. Just an idea, if we can't solve this very problem.

    Leave a comment:


  • replied
    Sorry I was away from my desktop earlier - just tried it and no it doesn't work unfortunately!

    Leave a comment:


  • replied
    Originally posted by joeycampbell View Post
    Thanks for the feedback
    Did that even help? xD

    Leave a comment:


  • replied
    Thanks for the feedback

    Leave a comment:


  • replied
    Ehm, why don't you put the GetCurrentLevelName node between OnDestroyed and OpenLevel?
    The thing you do should probably be saved in a variable.

    Leave a comment:


  • started a topic Level restart only works once after player death

    Level restart only works once after player death

    Hi - I'm trying to restart the game if the player falls off the level.
    The attached blueprint works..but only works once...if you die twice it doesn't re-start.
    Any ideas ?!
    Click image for larger version

Name:	restart.jpg
Views:	1
Size:	54.2 KB
ID:	1167703
Working...
X