TheGameCreators / GameGuruRepo

The GameGuru Repository For Community Collaboration
http://www.game-guru.com
137 stars 56 forks source link

On Player Death Controller #5131

Open extremestrategy opened 10 months ago

extremestrategy commented 10 months ago

Currently when the player dies the player either goes to the Game Over Screen, or if you have a respawn point, the player will respawn at that point, what I'm proposing is the ability to control what happens to the player when they die, and the ability to even have multiple of them happen when the player dies.

Go to another level.

Go to a death screen different than the default (so the dev can set a different death screen for each level)

Wipe the Inventory.

Decrease gold by X%.

Decrease Stats.

Decrease Player Level

Wipe the Inventory

MonkeyFrogStudio commented 10 months ago

Even a, "Would you like to continue?" pop-up ... and if you click 'No' then you go to the game menu and if you click 'Yes' then you start at a respawn point (or whatever, based on the post above).

Of course, the "Would you like to continue?" pop-up would be totally customizable so you could have whatever message you'd like in there, whatever graphic for the background, etc.. ;)

extremestrategy commented 10 months ago

Good idea.

LeeBamberTGC commented 10 months ago

@extremestrategy @MonkeyFrogStudio For some time I have been thinking there is a strong need for a set of 'global scripts' that are customized to the level/game being worked on. Hiding a barrel and assigning an always active script to it feels very hacky, but a special list of behaviors that are always running makes more sense, a list that can be added to, including a 'player death logic' script that can be whatever you need it to be, and would intercept the 'default' behavior of that logic style. We can then add a command to disable the default activity when the player dies so this script can take over. This approach would then work with any other baked-in system that we may wish to override with custom logic as they present themselves.

extremestrategy commented 10 months ago

Sounds good to me.