Bentley
Member
I'm curious why the line in the draw event runs twice.
global mouse left pressed event
draw event
The debug message, "this line ran", shows up twice. I thought that setting an array to 0 deletes it and therefore the next frame would not run what's the code inside the is_array condition
Maybe, b/c line_to_check equals 0, that is_array(0) is true b/c there is another array with that index? But there's only one array in the entire project.
Thanks for reading.
global mouse left pressed event
Code:
line_to_check = [point, prev_point];
Code:
if (is_array(line_to_check)) // "if line_to_check != 0" will work but I want to know what I'm misunderstanding
{
// Delete array
line_to_check = 0;
show_debug_message("this line ran");
}
Maybe, b/c line_to_check equals 0, that is_array(0) is true b/c there is another array with that index? But there's only one array in the entire project.
Thanks for reading.
Last edited: