W draw nic nie mam, mogę podrzucić info o obj_bullet1, jeżeli to coś pomoże.
GML
Information about object: obj_bullet1
Sprite: spr_bullet
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask:
Physics
Start Awake: true
Is Kinematic: false
Is Sensor: true
Density: 0.1
Restitution: 0
Group: 0
Linear Damping: 0
Angular Damping: 0
Friction: 0
Shape: Polygon
Points:
(0, 2)
(8, 2)
(10, 4)
(8, 8)
(0, 8)
Create Event:
execute code:
///Inicjalizacja
//move_towards_point(mouse_x, mouse_y, 10);
dir = point_direction(obj_player.x,obj_player.y,mouse_x,mouse_y);
phy_speed_x = lengthdir_x(10,dir);
phy_speed_y = lengthdir_y(10,dir);
damage = obj_player_stats.attack+2;
creator = noone;
fire_rate = 10;
phy_bullet = true;
Alarm Event for alarm 0:
execute code:
instance_destroy();
Step Event:
execute code:
image_angle = point_direction(obj_player.x, obj_player.y, mouse_x, mouse_y);
if(distance_to_object(obj_player) > 200){
instance_destroy();
}
Collision Event with object obj_wall:
execute code:
/// niszczenie pocisku po uderzeniu
instance_destroy();
Collision Event with object obj_lifeform_parent:
execute code:
/// Obrazenia w wszystkie formy zycia
if (other.id != creator) {
other.hp -= damage;
// instance_destroy();
alarm[0] = 1;
}
Collision Event with object obj_door:
execute code:
instance_destroy();