0
Answered

How to trigger state change in Character component

Ryan Ferris 10 months ago in Game Creator updated by Marti (Lead Developer) 10 months ago 2

Hi, 

I have imported my own character model and applied it to the character component. I also imported animations that work with the character.  When applying these animations as default states in the  character component viewer they work but I want the states to change during game play. For example, I want the character to be in the idle state when standing still and then change to a moving state when moving. 

I am not sure how to do this and would be greatly appreciative of any support you could give me. Thank you!

Unity version:
2019.3.0a3
Game Creator version:
1.0.7

Answer

Answer

Sounds like you want to make a state for your character using those animations:

https://docs.gamecreator.io/game-creator/game-creator/characters/states

About halfway down the page is section called custom states. Once you make one of those with your animations you could just add a trigger to your scene set to "at start" then an action to change the character state to your custom state.

Answer

Sounds like you want to make a state for your character using those animations:

https://docs.gamecreator.io/game-creator/game-creator/characters/states

About halfway down the page is section called custom states. Once you make one of those with your animations you could just add a trigger to your scene set to "at start" then an action to change the character state to your custom state.

Answered

Yup! Shane Peterson is right. Also, I would add there's a video tutorial that shows how to deal with Gestures & States, in case you prefer it to a written format.

https://www.youtube.com/watch?v=X1pRSi3Qgg8

Cheers!