Need help on my blood engine

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);
 
N

Necavare

Guest
You should insert the code segments into code. Its a lot easier to read. To do that go to insert > code and type whatever.

Code:
It will look like this
Sorry I cant help with your engine much just thought I would give you this advice and it might allow others to help you easier.
 

sp202

Member
You need to draw the silhouettes of all the blocks onto the surface and then use a blend mode such that the blood that isn't overlapping the blocks is erased.
 
Top