i set a certain type of bullet stop when it collides with a wall, but for some reason in the next step its not colliding with it, this happens randomly but i never use rng(except for visual effects)
obj_bullet step event:
Timeline step 390:
in the step 450 of the timeline, it adds speed to all the bullets, but sometimes that doesn't happen, because if at least one of the bullets its not colliding with the wall, step 390 will repeat.
what happens is that, a bullet collides with the wall, and therefore, sets its speed to 0, but sometimes (this is the problem) it "unstucks" itself from the wall, floating in the air with 0 speed
i already tried removing the direction += 180, but thats not the problem
obj_bullet step event:
Code:
var block;
block = instance_place(x,y,obj_solid);
if (block != noone){
//Irrelevant stuff
if stick{
speed = 0;
}
}
Code:
///Warn the player
var check_bullet = 0;
for (i = 0; i < array_length_1d(bull);i++){
with bull[i]{ //Loop through all bullets
if !place_meeting(x,y,obj_solid){ //If at least one of them is not stuck in the wall, repeat
with other{
check_bullet++;
}
}
}
}
if check_bullet > 0{ //If one or more bullets aren't stuck in the wall
timeline_position--;
}else{
for (i = 0; i < array_length_1d(bull);i++){
with bull[i]{ //Loop through all bullets
effect_create_above(ef_explosion,x+128,y,3,c_green); //this is temporal, bullet its supposed to shake
direction += 180; //Point to where the bullet came from, the boss
}
}
}
what happens is that, a bullet collides with the wall, and therefore, sets its speed to 0, but sometimes (this is the problem) it "unstucks" itself from the wall, floating in the air with 0 speed
i already tried removing the direction += 180, but thats not the problem