Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / [SOLVED] Integrate buttons in game

Author
Message
Humildadever
9
Years of Service
User Offline
Joined: 17th Aug 2010
Location:
Posted: 2nd Jan 2019 12:41
This post has been marked by the post author as the answer.
Hi!

I have the game with keys for pc but now i want button for put in android how can i easly integrated?

AddVirtualButton (23, 70,214,35)
SetVirtualButtonText (23,"Esq. ")


//Movimentar se para a esquerda com teclado
elseif GetRawKeyState (37)
SetSpritePhysicsVelocity (character, -300, GetSpritePhysicsVelocityY (character))

The author of this post has marked a post as an answer.

Go to answer

PHeMoX
1
Years of Service
User Offline
Joined: 9th Jan 2018
Location:
Posted: 2nd Jan 2019 13:54
It's fairly easy to just add it like this;




For best control or readability of code, you may want to use GetVirtualButtonState(23) = 1 or GetVirtualButtonState(23) = 0 more explicitly.
Humildadever
9
Years of Service
User Offline
Joined: 17th Aug 2010
Location:
Posted: 4th Jan 2019 11:17 Edited at: 4th Jan 2019 13:40
Thanks works very well!



in the animation how can i integrate?

Login to post a reply

Server time is: 2019-08-18 05:17:19
Your offset time is: 2019-08-18 05:17:19