0
Answered

Is there a way to set up a condition or trigger for when the player is moving?

Tathunder 5 months ago in Game Creator updated 4 months ago 4

I would like to be able to start and stop some actions when the player is in motion. On step does not meet my needs very well in this instance.

For example I have a truck as my player and I want to play some engine noise and a dust particle effect only when the truck is in motion.

Unity version:
latest LTS build
Game Creator version:
latest version

Yes, there is. But you will need to give some thought to how you utilise it as you character is a Truck.

It is in Conditions/Character/Character Property

Thanks.

I have it as my condition. And when "Is Running" it should instatiate my particle effect.

If my trigger is on "left mouse click" it works. I have a different "onstep" trigger that decreases an attribute. Works fine.

But when I set my trigger for the "Is Running" Condition to Onstep or to the attribute change it does not want to work.

Could this be a bug?

Answered

I don't think there's a bug here. If you attach the Condition "Is Running" on a On Step Trigger, it will execute that condition every time the character takes a step.

Try adding a Debug Message action and see where the problem is: In the Trigger or the Condition. Make sure also you have set up the correct target (scene objects and not prefabs)

Thanks, for your help. It is working now.