hi guys,i have that issue,i cant make the character rolling left and right by just pressing a B button on the controller, how to achieve that with the logic brick system?
i have created animation for both left and right rolling but i cant tranzlate on the joystick
are you talking about a joystick stick or a press button ?
Are you talking about (wanting to use) the joystick sensor ?
I’m talking about pressing the B button of the joystick and the character to roll on the right and left side,
How can I do with logic bricks ?
I’m telling this because rolling in one side it’s easy but how can I do to roll on the other side with pressing the same button?
Try this … when you push B , it does animation “LEFT” and when you release, it plays animation “RIGHT”
First controler is a “AND” and the second is a “NAND”
If you want to toggle Animation “LEFT” / “RIGHT” (it plays left, then right, then left , then right … etc) . As you can see , u need a boolean property to be able to switch.
In both cases, i gave priority to the “RIGHT” animation over the “LEFT” one. Otherwise, it could have froze as it does when both animation are played on the same layer when 1 animation starts to play while the other one is still running
Thank you,I will try tomorrow and will come back
actually, in your case, events are mutually exclusive and so there’s no conflict ( = animation freeze if same priority number and both trigger condition are true)
- So, if you want the newer animation to interrupt and replace the other one (even while running) , set the priority of both with same number ( ie : 0)
- But if you want 1 animation to be fully complete before it got interrupted , ensure it has a lower number than the other one (lowest number = highest priority)
Btw, if you are using an object and not an armature, you may want your animation to be continuous and so maybe u should just use a motion actuator
Would be interesting how the animations look.
if it’s just the same backwards then also “flipper” could be used with “level” on the trigger.
This will play the animation as long as the button is pressed.
Or if the animation should play fully then with usage of a toggle property like blenderaptor suggested.
great info,the property thing works,its works for rolling and for things like make character pick his sword from his back and return back to his back again!!!
very nice!!
but i have one final question regarding the rolling,how to decide if i want this moment to roll right instead of left? for examble if the enemy is attacking me and i first must roll in the right instead of left or the opposite?
as you can see before, the B button is used to toggle the value of the property … and each time this property value changes, it triggers either the left , either the right animation … in alternation
Now, what you are wanting is something like this … it’s the Monster/Enemy that tells what your character should do … and the Button B just reads and copy the property of the Monster … after that works same than before
Ofc, things like this can be done in python code too . But fine if you use bricks … It’s just that u gonna have to make bricks for your Monster too
flipper is cool stuff especially for things like energy concentration and then release too often forgotten … never really understood what level is supposed to do , never used it so far