Genesys Generation
Member
I am using the collision_line_list function to detect all objects of a type.
In this case, the object is obj_CapMan.
Code:
This code is in an object that would be equivalent to the game administrator. What should not influence anything, but in any case, is the information.
Full Code:
As a result, none of the objects on the list are being destroyed, but another one that is neither the manager nor the obj_CapMan, is being destroyed.
Documentation Link:
https://manual-en.yoyogames.com/#t=...e&rhhlterm=collision_line_list collision_line
-----
This red square is an object to detect a headshot.
That same object that is being destroyed, even though it is not mentioned in that part of the code at any time:
In this case, the object is obj_CapMan.
Code:
collision_line_list(obj_HatMan.x,obj_HatMan.y,mouse_x,mouse_y,obj_CapMan,false,true,listaCap,false);
This code is in an object that would be equivalent to the game administrator. What should not influence anything, but in any case, is the information.
Full Code:
listaCap=ds_list_create();
listaNum=collision_line_list(obj_HatMan.x,obj_HatMan.y,mouse_x,mouse_y,obj_CapMan,false,true,listaCap,false);
if(listaNum>0){
instance_destroy(listaCap);
ds_list_destroy(listaCap);
}
As a result, none of the objects on the list are being destroyed, but another one that is neither the manager nor the obj_CapMan, is being destroyed.
Documentation Link:
https://manual-en.yoyogames.com/#t=...e&rhhlterm=collision_line_list collision_line
-----
This red square is an object to detect a headshot.
That same object that is being destroyed, even though it is not mentioned in that part of the code at any time: