Top down rpg style game
Guys, how are you?, Guys, how do I make a top down game system on gdevelop5 and the attack button, when I did it worked, but when I touch the attack button and the analog stick at the same time, play starts to play make the running animation and when I tap the attack button or the analog stick it goes back to normal how do I solve this
By checking the game logic around the events that control the animation and movement. If you’re stuck, post screen shots of the events around the movement and animation changes.
Dude can you give me an example when you have time I tried and tried again and it failed, this game is for mobile and I don’t want to cancel another project
You need to give a screen shot of the events before we can do anything. I’m not making an example when I don’t know what’s causing the problem. There’s a strong possibility it’ll be something like event order, variables being set incorrectly or the like.
The problem is because you are using single mouse/cursor conditions and actions, while the game is actually multitouch. It makes the logic more complicated than it needs to be.
I’d suggest you look at GDevelop’s Virtual Joystick example, particularly the “Single Joystick with Buttons” scene. I think it is exactly what you’re trying to achieve - move with joystick, and action with buttons.
In that example, ignore the Mouse controls section, and focus on the “Multitouch Joystick controls” and the “Gamepad controls” sections.
As an aside, I’d also suggest you change the global variable pose to a string, and use a verb. And set animation using their name, rather than their number. It’ll make reading and understanding the events a bit easier.
Sorry, I don’t understand that part. The attack plays repeatedly when the A button is touched. Is this what you want, or for the attack to play only once?
In the event of your previous screen shot, you have 3 conditions:
Player is not moving
Global variable pose = 0
The A button is pressed.
All 3 of those events have to be true for the actions to be processed. For the actions to happen again, at least one of those conditions has to change so it is false before becoming true again.
Since the player doesn’t suddenly move and then stop, and the A button is continually pressed, I’m guessing the value of pose changes.
I’m not sure what the pose variable does, but is it necessary in this case? Can you do without it?