• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Android Creating Virtual D-Pad for Mobile Game

A

A 5 Year Old

Guest
I have been trying to do this for 8-9 hours now, I cant get it to WORK! Every tutorial is either 4-5 years old or in spanish. Im a beginner and this is kinda frustrating that mobile implementation of keys can be this hard.

I currently started with the tutorial:
But the video involves Xbox controllers.

How do I add it for movement instead of what I currently have Along with aiming using the virtual keys as well.

Its very confusing considering what I have right now since the mouse is shooting..

I dont know what to change or do at all.

Here is what I currently have:

https://drive.google.com/open?id=0ByAFyEyrOX9cT09zaUZ4anBpVUE

Also this is example of my oPlayer: https://imgur.com/a/DeMdD

This is Visual Buttons I would like to incorporate:https://imgur.com/a/b0NVg

Thanks

<3
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Don't change anything that you have and instead create 4 virtual keys for the controller on screen. Create them in the CREATE event of the controller instance, then destroy them again in the ROOM ED event. They will work the same as if a keyboard key had been pressed, so your vk_ checks in the player object should work as-is.
 
A

A 5 Year Old

Guest
Don't change anything that you have and instead create 4 virtual keys for the controller on screen. Create them in the CREATE event of the controller instance, then destroy them again in the ROOM ED event. They will work the same as if a keyboard key had been pressed, so your vk_ checks in the player object should work as-is.

Even though they are mouse shooting? Would the buttons overlap the mouse shoot?

Also, is there a tutorial for this? I have no idea what or how destroying works through code or a room ed, or vk check.
 
B

BloodCorn

Guest
@A 5 Year Old Ok, room ed = room end and if you don't know what a vk check is then you should be trying something else first and then working up to that, if you did indeed follow the platformer tutorial you should know what it is. To clarify, a vk check is a function such as keyboard_check_pressed(vk_up) which checks the vk or 'virtual key' to see if it is pressed, there is a way to simulate the press by using the function keyboard_key_press() this should help you, you can create a dead zone to disable being able to shoot in the area of the buttons. I hope this has helped, if you have any more questions then just ask.
 
Top