Moving property.

Hello!!!

How I can make property who value is 1 when my character moving and value 0 when not moving?

If posible without script.

Thanks!:smiley:

Well… how ( what setup) is your character moving?

I wanna when press WASD then moving property 1 and when you don’t press one of these then propery value 0. Thats all!:smiley:

Connect ALL your movement sensors to an OR controller;
Connect ALL your movement sensors to a NOR controller;
Connect the OR controller to a PROPERTY actuator that sets the property to 1;
Connect the NOR controller to a PROPERTY actuator that (re)sets the property to 0.

See the attached example, where only two movement keys (A and S) have been implemented for simplicity.

mb

Add a “Int” property named “prop”, value “0”
Then:
Whatever Sensor ( keyboard?) - AND - Property Actuator - Assign - Prop: prop - Value: 1

Whatever Sensor ( same as above)- “INV” button enabled - AND - Property Actuator - Assign - Prop: prop - Value: 0

Bye

May be I’m wrong, but please note that using AND controllers and inverted sensors, as suggested by OTO, two sensors, two controllers and two actuators for each direction key are needed.

For example to manage 4 direction keys (W, A, S, D) you need 8 keyboard sensors, 8 AND controllers and 8 property actuators.
More efficiently, using OR and NOR controllers, only 4 sensors, 2 controllers and 2 property actuators are needed.

mb

Yes mb10, you’re more efficient!
Bye

Thanks OTO, very kind of you!

mb