Glitchy Set Graphic Flip
-
You ask how do you fix this so it doesn't happen. What exactly do you want to happen when you press both sides? Do you want say one side to always override the other?
-
@Aidan-Oxley i actually want another animation to happen when both sides are pressed. An animation of the character looking up only if it detects when both sides are pressed at the same time. If this cannot happen. I wouldnt mind one side overriding the other just to stop the glitching effect.
-
@SplitMindGaming For this I would use a Value behavior. When you press one button it add 1 to the Value, and when the Value is equal to 2, it means that both buttons are pressed at the same time. Don't forget to subtract 1 when you stop touching one button.
-
Here's how I did it:
Here's a link to the example project: https://go.aws/3cYIJ55
-
@Aidan-Oxley thank you for that. Its exactly what i was looking for.
-
@Aidan-Oxley hey so ive been trying to get your file to work with the one i provided. For some reason i cannot get it to work when dealing with while touching. I can get it to work with started touching but the moment i use while touching for the apply force effect the process breaks. On file i provided. Are you able to get it to work With what you came up with. I know it on my file it flips the graphic either right or left. Maybe while pressing both you can have it show a complete different graphic to symbolize that both buttons are being pressed together. Please if you can show it how its done with the while touch behavior I will be your best friend :)
-
Heres the file once more Weird Glitch.tap
-
@Aidan-Oxley actually disregard my previous message. I just figured it out :)
-
@SplitMindGaming Ok. I read them anyway :P you could've just added these started/stopped touching behaviours in anyway as extra logic apart from your while touching stuff. What did you do to get it working?
The reason it broke I imagine is because I'm using add/subtract values. When you use started touching it adds up once, when you use while touching it adds up 60 times per second and yeah that would break it. Another thing you could do is remove my add/subtract values and replace them with set Input Field to 1 or 0 of the box container, if this makes sense.
-
@Aidan-Oxley Yes i actually just kept everything you had. But added the while touching on top of it with only the specific controls to those events. That way the started touching can handle all the coding events to input the graphic flip or animations and the while touching to handle the actual character movement.