Question with Hurt State

Jonathan Yale 5 months ago in Game Creator updated by Navarro Family 4 months ago 5


I am attempting to make a “Hurt” condition but can not seem to get it to function properly. When the player takes damage and the player’s health drops below a center point, the player enters the hurt state. When the player heals, the player’s state is reset (this portion works as wanted). When the player is in the hurt state, and then crouches and enters the crouch state, then leaves the crouch state, the player does not return to the hurt state even though the player’s health is below the center point. Is there a way to fix this? 

Thank you!

Unity version:
Game Creator version:
Satisfaction mark by Jonathan Yale 5 months ago

Not sure if that's the problem, but I don't see any Player on your scene. Without a Player with a Stats component, this Trigger will never be executed.

To make it look cleaner and In order to take the picture I opened a new scene and separated the trigger so that it was by its self. My player does have the stats component attached. 

Yeah, that was the problem. if you don't have a Player (or if you do, but it does not have the Stats component), then you can't access the Stats on the player. You need to use the Stats component on those objects.

To solve the problem, simply right click on your Hierarchy Panel and select Create -> Game Creator -> Characters -> Player. Then, add the Stats component. It should work now.


This is the same issue that I'm having except with drawing a weapon during crouch or hurt states.

It takes you out of Crouching when you draw.

This is the answer, for anyone else searching for it.