So I want a character to have an idle and a walking animation (and a grabbing animation but it’s not the point now)…
I have an Always sensor to play the Idle, then I have a Keyboard sensor (W) to play the Walk. The Walk goes fine, but as soon as I release W, the character just stops there, motionless (when it should play the idle).
I read that I had to set priorities, high for the defaults and low for the overrides. I have Priority 1 for my Idle, and 0 for my Walk, but it still does not work…any help?
Set the Always sensor’s true pulse (the button that looks like [’’’] ) on. That way, it will always be triggering. Without true level pulse triggering on, the always sensor just triggers once (as it should).
The effect of priority takes place when you activate two or more actuators at the same time.
To give you a good solution, we need to know your setup.
YES! Thank you, the TRUE was the solution.
I was watching a tutorial but apparently the guy forgot to mention that
Something to think about here is that your idle will probaly happen when you player is not providing input. So why not try using an inverted Keyboard sensor and enable all keys. I know down the line you might have keys for inventory or pausing but you can modify your logic for that as the need arises.
I wouldn’t recommend relying on no keys being pressed to play your idle, because if the player presses a key that doesn’t do anything the idle will still stop. Better to have it running underneath all animations, or just enabled when specific keys are not being pressed (or just while the character is in a certain state, or some such)
I suggest to use an FSM (e.g. the build-in state system). With that you do not run unnecessary animations and you have absolute control over the input/output.
I do not have any more problems guys! I solved it by using Always TRUE (the [’’’] thingy) and the Idle does not stop or pause when I press random keys, it’s all good
Heh, you’ll find that once a problem has been solved, discussion tends to continue beyond just the problem at hand. It’s not uncommon for people to have different approaches to a problem, and opinions on the benefits or disadvantages of one solution over another, and so on.
You should mark the thread as SOLVED, then, by going into Advanced Edit mode in your first post and changing the prefix.