Hi,I think the title says all!
I want to make a character crouch let’s say with the b button and start walking in crouch position with another button or sticker, how can I achieve that with the brick logics?
I’m struggling to find a solution
I think you didn’t even try
I gave you last time the trick on using properties along with Property Sensors and Actuators .
Also, better keep use your old thread rather than creating new one to ask basically the same things.
I use it but I couldn’t figure out for this combination
you have to understand how to use property’s because thy are important to controll your character states
like have a property set to Boolean with the name crouch !
add a keyboard with the button B and add it to a property actuator set to toggle !
wehnever you press the B button , the crouch is going to toggle between True and False !
False means not crouching
True means crouching
state 1 " not crouching "
now when you press the W key for moveing foreword ! you will add a nother property sensor to the and , and set the sensor to the crouch and set the value to False !
in the other side of the and set a motion actuator and assign the movement speed you want !
like lets say 0.1 in the Y axis
now repeat this again in state 2 but with the changes you will see
state 2 " crouching "
now when you press the W key for moveing foreword ! you will add a nother property sensor to the and , and set the sensor to the crouch and set the value to True !
in the other side of the and set a motion actuator and assign the movement speed you want !
like lets say 0.05 in the Y axis
like this
If you want more control but without having to use python
@alf0 better not duplicate same sensors even if what you did works You can use your “move” sensor on both
yes i was going to do that !
but i thought for a new guy it might be complicated !
@blenderaptor @alf0 big thank you for the help,I will try in few hours and I will come back
I really appreciate
ok i tried your version and its works nicely,i add extra pose for going down in crouch position+the crouch walk ,very nice!!
now i will try the blenderaptor solution too
update:the blenderaptor solution didnt worked but likely i have to investigate more, generally speaking big thank you,im understanding the properys better and the game logics in general, i will try to expand now in environment interactions
it works on ubge 0.25 / Range 1.0 . I set it up and tested it. You probably forgot to give a name to sensors bricks since people usually don’t bother doing it.
The advantage using of using “Expressions” for controllers is that you can be more precise .
Here Below, you can even use Properties directly into them (so, no need to use property sensors for that matter)
very nice,thanks