2d_warrior
Member
How do you find the id of an object on a collision_line since it goes with an if statement, and probably doesn't set variables?
The Manual entry for collision_line() said:Returns: Instance id or noone
How do I set it to a variable then? Please show me. Do I do it without an if statement first and then check with if a second time?Uh... it already returns the instance ID?
colliding_instance = collision_line(x, y, x+100, y+100, obj_enemy, false, true);
a = 5;
b = 7;
key = vk_up;
a_equals_b = a == b;
up_pressed = keyboard_check_pressed(key);
noone it is!For now it's 100000, but don't count on it staying that way in the future or across exports.
If you want to check for sure whether a real instance has been found, check that it is not set to noone.