Steam'i Yükleyin
giriş
|
dil
简体中文 (Basitleştirilmiş Çince)
繁體中文 (Geleneksel Çince)
日本語 (Japonca)
한국어 (Korece)
ไทย (Tayca)
Български (Bulgarca)
Čeština (Çekçe)
Dansk (Danca)
Deutsch (Almanca)
English (İngilizce)
Español - España (İspanyolca - İspanya)
Español - Latinoamérica (İspanyolca - Latin Amerika)
Ελληνικά (Yunanca)
Français (Fransızca)
Italiano (İtalyanca)
Bahasa Indonesia (Endonezce)
Magyar (Macarca)
Nederlands (Hollandaca)
Norsk (Norveççe)
Polski (Lehçe)
Português (Portekizce - Portekiz)
Português - Brasil (Portekizce - Brezilya)
Română (Rumence)
Русский (Rusça)
Suomi (Fince)
Svenska (İsveççe)
Tiếng Việt (Vietnamca)
Українська (Ukraynaca)
Bir çeviri sorunu bildirin
For GML:
if keyboard_check(ord('A'))
{x-=5}
This will move the object 5 pixels to the left, if I remember correctly.
Yes, but I need continuous movement, not pixels every tap of a button. Sorry, needed to be more specific.
for tapping is keyboard_check_pressed
Well, both just go left 5 pixels, then stop. I don't know if its a glitch or what.
Create a Step Event.
Then Copy Paste the following.
playerSpeed = 5;
//Shortcuts for keypresses
MOVELEFT = keyboard_check(ord('A'));
MOVERIGHT = keyboard_check(ord('D'));
MOVEUP = keyboard_check(ord('W'));
MOVEDOWN = keyboard_check(ord('S'));
//Move Player
if (MOVELEFT && x > sprite_width/2)
{
x -= playerSpeed;
}
if (MOVERIGHT && x < room_width - sprite_width/2)
{
x += playerSpeed;
}
if (MOVEUP && y > room_height/2)
{
y -= playerSpeed;
}
if (MOVEDOWN && y < room_height - sprite_width/2)
{
y += playerSpeed;
}
if (MOVEUP && y > room_height/2)
to....
if (MOVEUP && y > sprite_height/2)