W
Whirlpoolio
Guest
HI! So I'm making a game where you have to find your way around life because you got a chance to redeem yourself. Unfortunately that is in the 2d, pixel world. You can grapple on certain things etc.
I'm having trouble actually getting the desired effect of the paint splash on the block. I've made it so when a bullet hits a wall, it makes oBlood. oBlood would 'explode' if you like, and hits many surfaces but I want it so it doesn't drip and kind of makes this effect:
The drip effect currently is too intense and ugly.
oBlood stuff:
CREATE
STEP
ALARM 0
oBloodController Create event:
sBlobly is a centered, white 16x16px circle. I don't haved physics enabled. Any help is appreciated!
I'm having trouble actually getting the desired effect of the paint splash on the block. I've made it so when a bullet hits a wall, it makes oBlood. oBlood would 'explode' if you like, and hits many surfaces but I want it so it doesn't drip and kind of makes this effect:
The drip effect currently is too intense and ugly.
oBlood stuff:
CREATE
Code:
/// Defining some variables
slowDown = random_range(1.25,3.5);
scale = random_range(0.2,0.8)
red = irandom(255);
green = irandom(255);
blue = irandom(255);
colour = make_colour_rgb(red,green,blue);
alpha = 1;
image_xscale = scale;
image_yscale = scale;
direction = random(360);
gravity = .5
vspeed = random_range(6,-24);
hspeed = random_range(-6,6);
alarm[0] = 120;
Code:
/// Set direction
image_angle = direction;
image_alpha = alpha;
// If collide with solid
if (place_meeting(x,y,oInvisibleBlock)) {
visible = false;
if (speed > 0) {
speed -= slowDown;
}
// Draw to surface
if (!surface_exists(global.surface_blood)) {
global.surface_blood = surface_create(room_width,room_height);
} else {
surface_set_target(global.surface_blood);
draw_set_blend_mode_ext(bm_one, bm_inv_src_alpha)
draw_sprite_ext(sBloby, 0,x,y,image_xscale,image_yscale,image_angle,colour, alpha);
draw_set_blend_mode(bm_normal);
surface_reset_target();
}
} else {
visible = true;
}
Code:
/// Stop lag and destroy after made
instance_destroy();
Code:
if (!surface_exists(global.surface_blood)) {
global.surface_blood = surface_create(room_width,room_height);
} else {
draw_surface(global.surface_blood, 0,0);
}