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.

AppGameKit Classic Chat / how to control the player?

Author
Message
metamorpho
7
Years of Service
User Offline
Joined: 17th Oct 2016
Location: Planet Earth
Posted: 29th Apr 2019 22:29
If GetRawKeyPressed(39) // right
dlx=lx+1:dly=ly:puty=1:sped=2:Goto tara
endif
If GetRawKeyPressed(37) // left
dlx=lx-1:dly=ly:puty=2:sped=2:Goto tara
endif
If GetRawKeyPressed(40) // down
dly=ly+1:dlx=lx:puty=3:sped=2:Goto tara
endif
If GetRawKeyPressed(38) // up
dly=ly-1:dlx=lx:puty=4:sped=2:k:Goto tara
endif

This code works so you have to press the key again and again so that the player performs the action.

I need that when the key is pressed to the right, the player is constantly running to the right.
Which team do this?
Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 29th Apr 2019 22:34
GetRawKeyState
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
metamorpho
7
Years of Service
User Offline
Joined: 17th Oct 2016
Location: Planet Earth
Posted: 30th Apr 2019 07:30
Ortu, thanks !!

Login to post a reply

Server time is: 2024-04-23 21:30:54
Your offset time is: 2024-04-23 21:30:54