You might have noticed a problem with handling Link's movement with the conventional method
(you know, the
if place_free(x-something,y) {x-=something}
thingy)
If for example something=2 and there is a solid object 3 pixels to the left of Link,Link will stop 1 pixel away from it.Most of the time this isn't
noticable,but when Link can just pass between two objects, a problem might occur.
So here's a workaround for this:
Set two variables first:
global.xspeed=3;//or any other number
global.yspeed=3;//same here
Then in the step event:
if keyboard_check(vk_left)
{
for (i=1; i<=global.xspeed; i+=1)
{
if place_free(x-1,y) {x-=1}
}
}
if keyboard_check(vk_right)
{
for (i=1; i<=global.xspeed; i+=1)
{
if place_free(x+1,y) {x+=1}
}
}
if keyboard_check(vk_up)
{
for (i=1; i<=global.yspeed; i+=1)
{
if place_free(x,y-1) {y-=1}
}
}
if keyboard_check(vk_down)
{
for (i=1; i<=global.yspeed; i+=1)
{
if place_free(x,y+1) {y+=1}
}
}
That way Link will move by one pixel three times(or however many you want) each step
instead of moving by three pixels each step and the place_free check will occur for every pixel,letting Link move as close to a solid
object as possible.
[Alex Edit] - That colour is pretty much invisible on other skins. Your post has been edited to include code tags.