How to set the Preset of Default state?

ahkow

New member
So I played around with the demo scene's Ultimate Character Locomotion States.

I added Time Scale=0.5 to the preset of Aim state. I play the game and right-click, Aim becomes active and Time Scale becomes 0.5.
When I release the right mouse button, Aim is inactive and Default is active. Time Scale stays at 0.5.

So I figure that I should add a Time Scale=1 in the preset of "Default" state. But this Default state is disabled and there's no way to change its preset.

How should I solve this problem? Thanks!

state.png
 
The default values are stored when you first run the game. If the time scale stays at 0.5 then it is either 0.5 when the game starts or the aim state isn't being deactivated.
 
Aim is inactive when right mouse button is released. And Time Scale is 1 before the game starts, and it is also 1 before I right-click to aim.
I tested other properties, their values are restored when Aim is inactive. Seems like it happens to Time Scale only.
 
You're right - in UltimateCharacterLocomotion the TimeScale property has the [NonDefaultSerialized] attribute. I need to think why I added that attribute but if you remove it then it'll work.
 
Top