Dead Body Buildup

Hi everyone,

I’m in the process of creating a small slender man type game in which you travel through a cave while being hunted by Medusa.

My idea is to have Medusa turn the player into stone once she catches them. The character will slowly freeze into whatever position they’re in. The character will then respawn, but I DON’T want the body to vanish, I want their frozen model to still be in the same spot when they return.

So for example if you die twenty times in different areas throughout the cave, I want the player, once they respawn, to be able to go back and see twenty frozen models of themselves in each area they died.

I just wanted to know if there is a script that could help make this possible I’m still at very early stages of making this game.
I’m horrible at explaining things, so if there is any additional information needed just let me know

Thanks

This is a cool idea. It will be a treat for the players to see the dead “turned to stone” corpes of the previous play throughs.

Im strictly an artist so I know no code to help you out - however I think a good implementation to this idea is to swap out the rigged character with a duplicate non-rigged static mesh of the character. The static mesh will be in the pose the character turned to stone but have no rigging and will be only a mesh with a collider instead of a skinned character model along with a stone looking texture swap.
This should free up some resources a bit.

To ease the complication of infinite possible death/stone poses - Id create 6-8 death cycle animations and create 6-8 static mesh snapshots of the last frame of the animation cycle. This snap shot mesh will be the static mesh statues when the level resets. Randomize the death sequence so each death isnt the same pose.

Interesting idea - is this going to be a runner?

Is this a 2D or 3D game? If it’s a 2D game using simple sprites, it’s pretty straight forward and easy. For a 3D game it would be more complex.

If it is a 2D game. Create an empty sprite prefab. And then do

public Color stoneColor;

void Petrify () {
        GameObject stoned = new emptySprite;
        SpriteRenderer stoner = stoned.GetComponent<SpriteRenderer> ();
        SpriteRenderer player = GetComponent<SpriteRenderer> ();
    
        stoner.sprite = player.sprite;
        stoner.color = stoneColor;
    
        Instantiate (stoned, transform.position, transform.rotation);
    }