Toggling between stances?

Hi. I was wondering if there’s a way to toggle between stances for a character. For instance, my character has a casual stance, when all the attacks can’t be done, and a battle stance, in which they can be done. The former is for when there are no enemies about. Later on as I construct the game, if this is possible, I’ll make the character change to a battle stance at the presence of enemies, but for now I’d like to see if I can hit a key and the character’s idle stances and movements can change to animate the character accordingly, and in which attacking is enabled.

I’m still getting familiar with the blender game engine and logic systems and I don’t know what’s possible and what’s not yet, so please tell me if there’s a way to do this or not.

Thankyou. :slight_smile:

Yep that shouldnt be too hard at all.
Use a property named stance (or whatever) and it can be made either and int or a bool prop. When stance =1 (or TRUE with bool) your character can be in idle mode. When stance=0 your character can be in battle stance.
By checking the property with a property sensor, an expression or python, will easily allow you to control his stance. You can attach a keyboard sensor to a property actuator and change it to the other stance.

All right :stuck_out_tongue: .

I was sort of reluctant to fix a keyboard sensor to a property actuator, because I thought you would have to hold to key down to keep the property active. :slight_smile:

Nope, just use two different keys with no pulse mode to switch between stances.