Hey guys! I know you might never help me at all on this, but I do have this situation when I'm attempting to create my own code to create my smooth movement for this slime:
This is what I have so far:
Code:
k_r = keyboard_check(vk_right)
k_l = keyboard_check(vk_left)
k_u = keyboard_check(vk_up)
k_d = keyboard_check(vk_down)
if k_l or k_r
movementable = true
if k_r or k_l
{
hsp += 0.475
if hsp > 2
hsp = 2
}
else
hsp = 0
x += hsp * scale
if k_r
scale = 1
else if k_l
scale = -1
I'll still keep trying to make it smooth and well as possible.
The only things I'm struggling so far is the collsion to an object (Solid) and I don't know how it's meant to be done.
Whether it's bemusing for a solution to be found, I'll do my best to follow and keep trying.
*I'm using Game Maker Studio, as always.
-Thanks, Pedigree
Hey guys! I know you might never help me at all on this, but I do have this situation when I'm attempting to create my own code to create my smooth movement for this slime:
[img]https://i.imgur.com/3YgjHZv.png[/img]
This is what I have so far:
[code]k_r = keyboard_check(vk_right)
k_l = keyboard_check(vk_left)
k_u = keyboard_check(vk_up)
k_d = keyboard_check(vk_down)
if k_l or k_r
movementable = true
if k_r or k_l
{
hsp += 0.475
if hsp > 2
hsp = 2
}
else
hsp = 0
x += hsp * scale
if k_r
scale = 1
else if k_l
scale = -1[/code]
I'll still keep trying to make it smooth and well as possible.
The only things I'm struggling so far is the collsion to an object (Solid) and I don't know how it's meant to be done.
Whether it's bemusing for a solution to be found, I'll do my best to follow and keep trying.
*I'm using Game Maker Studio, as always.
-Thanks, Pedigree :)