G
graviax
Guest
create event:
step event :
alarm event :
and finally the collision event with another blood particle :
I'm pretty new to GML but I know a little about programming, but I don't have any clue on optimizing this and optimizing a bit of program in general.
I need help
Code:
alarm[0] = 200;
Code:
if(!place_meeting(x,y+1,obj_wall))
{
if(vsp < 30)vsp += 0.1;
}
//Horizontal Collision
if (place_meeting(x+hsp,y,obj_wall))
{
while(!place_meeting(x+sign(hsp),y,obj_wall))
{
x += sign(hsp);
}
hsp = 0;
vsp = 0;
}
x += hsp;
//Vertical Collision
if (place_meeting(x,y+vsp,obj_wall))
{
while(!place_meeting(x,y+sign(vsp),obj_wall))
{
y += sign(vsp);
}
hsp = 0;
vsp = 0;
}
y += vsp;
Code:
instance_destroy();
Code:
if(irandom_range(0,10) > 5)
{
instance_destroy();
}
I need help