Announcement

Collapse
No announcement yet.

Show Game Over and Restart Level (Detect Death)

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

    Show Game Over and Restart Level (Detect Death)

    Hi guys!

    Can someone help with this?

    After my chars dies, I want my game ro restart...

    (in future I will show a Screen with the "Game Over" and when he clicks the Game starta again.)
    I know that the Game Over Screen must be a another "project" in udk with fsCommand or something...


    But for now, what I don't know is how to detect when my player dies to do a restart.

    Kismet or Script?

    From kismet there is a ConsoleCommand called "start?restart" or something like that... but I don't how to use or what attach in it.

    I want to restart the game because when it automatically calls the LifeSpan all the meshs that was attached to my player dissapear...

    Some advice or hint?
    Thanks =)

    #2
    In kismet there's a node for pawn death. Events > Pawn > Death. Should work to plug your player var in there.

    If not you can override the death function in Pawn. (I think this is the right one)
    function bool Died(Controller Killer, class<DamageType> DamageType, vector HitLocation)

    I'd recommend the kismet approach first.

    Comment


      #3
      But using the kismet... I created a event "Death" .... but what I have to link with this to restart the level ?

      I trie a Console Commando with start?restart but didn't work :T

      And override the Died function I still have to put some "restart" some way =/

      That's the problem too =/

      Comment


        #4
        Icaroto
        Pawn.ConsoleCommand("start mapname.udk") works. You can get map name by function GetMapName.
        You can look to FLCT (Script Wizard) for details. In this program there is a GameOver screen too.

        Comment


          #5
          Im trying to do with kismet...

          I created a Death Event where: "Instigator" goes on Player 0 variable; "Out" goes on a Play Announcement (with the text "Test", just to see if works);

          I tried to debug and I noticed that the udk didnt activated the Death Event....
          What should I do? Im missing something...



          And with Script, I override the Died function and with that even my death animation didnt played...

          I really need a example...

          I'm trying now to find something on that link, but until now... nothing...



          Thanks !

          Comment


            #6
            Did it.


            For anyone with the same issue:


            Link a "Attach To Event"(in) on "Player Spawned"(out)

            On the "Attach to Event" link the player variable to the option 'Attachee' and the "Death" event in 'Event' place.

            x)

            Thanks for all the help guys!

            Comment


              #7
              Did it.


              For anyone with the same issue:


              Link a "Attach To Event"(in) on "Player Spawned"(out)

              On the "Attach to Event" link the player variable to the option 'Attachee' and the "Death" event in 'Event' place.

              x)

              Thanks for all the help guys!

              Comment

              Working...
              X