Player Stats and Hiding mechanism

Player Stats and Hiding mechanism.


Last week I worked on two scripts, one for giving the player  visibility, noise and smell attributes and one for adding those values to items and hiding spots. These attributes will later be used for the AI to detect the player. I still need to add an increment when the user moves in visibility and noise.

So the player starts with the values of:
Player
Visibility:70
Noise: 0
Smell: 10

The torch when lit has its own set of attributes to add to the players stats
Torch
Visibility:100
Noise: 5
Smell: 5

Hiding space
Visibility:-70
Noise: -10
Smell: -10

There are also hiding spots, which when you hide in them they reduce those values thus far reducing the chances of the AI to spot you.


How Hiding works

When the player approaches a hiding space (is within close proximity) and points to it with the cross hair (later on it will be when pointed by a controller) the hiding area gets highlighted.
when you left click the user controls are locked and the player moves towards a spot determined in the hide-in spot prefab.
For now the character just shrinks in order to fit in the spot. 
Later on with the VR there might be a animation played with the player laying down on his chest and using his elbows to crawl into the space.  moving into  a barrel would need another type of animation.



so the players attributes when hiding would be
Player hiding under ledge
Visibility:70
Noise: 0
Smell: 10

A player hiding with the torch would be
Player hiding under ledge
Visibility:100
Noise: -5
Smell: 5

Each AI will have its own attributes of detecting motion noise and smell.

Comments

Popular posts from this blog

Player stats and brightness.

Testing the PLG

More work done on the interface, saving data.