Can someone help me with selecting the timeline play rate depending if my player is walking, sprinting or crouching,

Currently Im using a structure full of booleans to determine if my character is walking sprinting or crouching.


I know im doing it wrong somehow, please help.

Im setting the booleans like this.
image_2024-07-17_203114656

1 Like

Try using an enum instead of loads of bools.

Then you only have to look at one variable :slight_smile:

how would I implement and enum? I cant find any newbie tutorial how to set the enums properly.

Right click in the content browser, and choose Enum.

It’s a variable that you can give the values ‘running’, ‘walking’ etc …

1 Like

tnx so much, now my code looks clean.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.