I posted this on Them In Us World last month and got zero replies, so I might as well try again here. If you need the .GMK source to figure this out, I can send it to you.
As you may know, I'm working on a game called Revenge of the Walrus, which runs in GM 8 and uses portions of both the Hello Engine 4 and DeeY Engine (as well as a decent number of features I've added myself). Two things are giving me trouble. One is vertically-moving platforms. Whenever Mario jumps on a vertical lift, there's about a 15% chance he'll fall right through (a higher chance with faster-moving platforms). Here's the End Step event I've been using (a Hello/DeeY combination):
Code:
if collision_rectangle(x,y-2,x+47,y+4,obj_mario,1,1)
and obj_mario.y < y-27
{if vspeed < 0
obj_mario.y = y-32
else
obj_mario.y += vspeed
if not collision_rectangle(obj_mario.x+9,obj_mario.y+5,obj_mario.x+9,obj_mario.y+31,obj_solid,1,1) and hspeed > 0
obj_mario.x += hspeed
if not collision_rectangle(obj_mario.x-9,obj_mario.y+5,obj_mario.x-9,obj_mario.y+31,obj_solid,1,1) and hspeed < 0
obj_mario.x += hspeed}
Another problem I've been having is the classic "get hit even though you stomped the Paratroopa perfectly" glitch that helps make Hello Engine games so much more fun. The DeeY Engine uses the same code, and this classic problem again rears its ugly head every now and then. Any suggestions for improving this mess?
Code:
if instance_exists(obj_invincibility)
exit;
if other.y < y-25-vspeed
and obj_mario.stompstyle = 1
{obj_mario.vspeed = 0
instance_create(x-8,y,obj_spinsmoke)
instance_destroy()
exit;}
if other.isslide = 0
{
if other.y < y-27
{sound_play(snd_stomp)
imdead = instance_create(x,y,obj_koopa); imdead.hspeed = direct/2; imdead.bugfix = 0;
scr_pointscale_silent(x-8,y)
with (other) event_user(1)
instance_destroy()}
//Hurt Code
else if other.invurnerable = 0
{with (other) event_user(0)}
//End Hurt Code
}
else if other.isslide = 1
{event_user(0)
scr_pointscale_slide(x-8,y)
instance_destroy()}
I posted this on Them In Us World last month and got zero replies, so I might as well try again here. If you need the .GMK source to figure this out, I can send it to you.
As you may know, I'm working on a game called Revenge of the Walrus, which runs in GM 8 and uses portions of both the Hello Engine 4 and DeeY Engine (as well as a decent number of features I've added myself). Two things are giving me trouble. One is vertically-moving platforms. Whenever Mario jumps on a vertical lift, there's about a 15% chance he'll fall right through (a higher chance with faster-moving platforms). Here's the End Step event I've been using (a Hello/DeeY combination):
[code]if collision_rectangle(x,y-2,x+47,y+4,obj_mario,1,1)
and obj_mario.y < y-27
{if vspeed < 0
obj_mario.y = y-32
else
obj_mario.y += vspeed
if not collision_rectangle(obj_mario.x+9,obj_mario.y+5,obj_mario.x+9,obj_mario.y+31,obj_solid,1,1) and hspeed > 0
obj_mario.x += hspeed
if not collision_rectangle(obj_mario.x-9,obj_mario.y+5,obj_mario.x-9,obj_mario.y+31,obj_solid,1,1) and hspeed < 0
obj_mario.x += hspeed}[/code]
Another problem I've been having is the classic "get hit even though you stomped the Paratroopa perfectly" glitch that helps make Hello Engine games so much more fun. The DeeY Engine uses the same code, and this classic problem again rears its ugly head every now and then. Any suggestions for improving this mess?
[code]if instance_exists(obj_invincibility)
exit;
if other.y < y-25-vspeed
and obj_mario.stompstyle = 1
{obj_mario.vspeed = 0
instance_create(x-8,y,obj_spinsmoke)
instance_destroy()
exit;}
if other.isslide = 0
{
if other.y < y-27
{sound_play(snd_stomp)
imdead = instance_create(x,y,obj_koopa); imdead.hspeed = direct/2; imdead.bugfix = 0;
scr_pointscale_silent(x-8,y)
with (other) event_user(1)
instance_destroy()}
//Hurt Code
else if other.invurnerable = 0
{with (other) event_user(0)}
//End Hurt Code
}
else if other.isslide = 1
{event_user(0)
scr_pointscale_slide(x-8,y)
instance_destroy()}[/code]