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 DBPro Corner / [RPG] Chrono Trigger like movement

Author
Message
Mystic Trunks
17
Years of Service
User Offline
Joined: 6th May 2007
Location:
Posted: 6th Dec 2008 01:22
Hey, I was wondering how RPG Movement was one in DBPRO, it should move in pixels instead of tileXtile.

In Game Maker 7 PRO I did something like this.

var dir, khd, khl, khr, khu;
dir = "d";
khd=(keyboard_check(vk_down))
khl=(keyboard_check(vk_left)))
khr=(keyboard_check(vk_right))
khu=(keyboard_check(vk_up))

if khd && khu
{
khd=0;
khu=0;
}
if khl && khr
{
khl=0;
khr=0;
}
//inaccurate Keys, you know the drill
example: if (dir="d" && !khl && !khr) { dir="d" }
//if a key is pressed, move it accordingly
if khd { y-=3; place_free(x,y-3); }

you get the idea.

DsarchyUK
15
Years of Service
User Offline
Joined: 21st Nov 2008
Location: UK
Posted: 9th Dec 2008 00:09

Login to post a reply

Server time is: 2024-09-27 22:26:42
Your offset time is: 2024-09-27 22:26:42