P
PURE
Guest
So I've been trying to make a blood engine following this thread here: https://forum.yoyogames.com/index.php?threads/unlimited-blood-splats.1624/
I'm trying to go for an effect simular to the INK game by ZachBellGames
But my blood still overlaps the wall sprite. (See image)
This is all the code I have:
Object Surface:
CREATE EVENT:
damagemask = surface_create(room_width, room_height);
DRAW EVENT:
if (!surface_exists(damagemask)) {
draw_surface(damagemask,x,y)
}
Object Blood:
STEP EVENT:
if (!collision_point( x, y, obj_solid, false, false )) {
if (surface_exists(obj_surface.damagemask)) {
surface_set_target(obj_surface.damagemask)
draw_self();
surface_reset_target();
}
instance_destroy();
}
Object CTRL (Blood Spawner):
GLOB MOUSE LEFT EVENT:
instance_create(mouse_x, mouse_y, obj_blood);
I'm trying to go for an effect simular to the INK game by ZachBellGames
But my blood still overlaps the wall sprite. (See image)
This is all the code I have:
Object Surface:
CREATE EVENT:
damagemask = surface_create(room_width, room_height);
DRAW EVENT:
if (!surface_exists(damagemask)) {
draw_surface(damagemask,x,y)
}
Object Blood:
STEP EVENT:
if (!collision_point( x, y, obj_solid, false, false )) {
if (surface_exists(obj_surface.damagemask)) {
surface_set_target(obj_surface.damagemask)
draw_self();
surface_reset_target();
}
instance_destroy();
}
Object CTRL (Blood Spawner):
GLOB MOUSE LEFT EVENT:
instance_create(mouse_x, mouse_y, obj_blood);