Jump to content

Recommended Posts

Posted

Is there a way to prevent the game from loading the last save? I want the player to get teleported to a place when he dies, is it possible? I also want the ragdoll animations to show so that it actually looks liek he died lol.

 

 

 

Posted

I would love to find out how to do this as well but don't need the rag dolls to show. Just so they can keep restarting

from the level, not reloading.

Posted

There are several approaches I could see on how to tackle this (might not work or work necessarily as planned, only how I would start to tackle the problem).

 

The first, and probably more of a brute force (but should be highly compatible) approach would be to have a script listening for OnUpdateGameTime() using some trigger to RegisterForSingleUpdateGameTime(0.0244) (0.0244 translates to 14.64 in-game minutes [pretty small time interval all in all]). Have a property containing the player and check their current health compared to their max health, and transport the player if it falls under a certain percentage.

 

Another approach (probably not as compatible as the other) would be to attach a script to the player itself to listen for the OnEnterBleedout() event. If the player starts to enter that state, do the action you want (which you can check to see if the player is the one bleeding out in the script) [Not sure if you could instead use the event within the same script for your UpdateGameTime() attempt. If you can, it will be more compatible than attaching it to the player].

 

Since an Actor is also an ObjectReference, there are a few events that ObjectReference's listen for that might be helpful in trying to determine player health state or player living state. Hope this helps.

Posted

Arnt there a great number of mods that already do this? perhaps you could look into one of them

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...