MeBoingus
Member
Hi guys,
I'm running into an issue using path changing functions in HTML5.
I am making a simple test project that uses this code:
Create:
Step:
To handle a simple "click to move" system. I know that there are other ways of achieving this, but I am simple using this as a demonstration for my issue.
In Windows, when the mouse is clicked - the object moves to that location and stops.
In HTML5, when the mouse is clicked - the object simply vanishes.
I added this code to the Spacebar Pressed event:
In Windows - the object shows a correct X and Y value.
In HTML5 - the object outputs a value such as:
Any idea as to why this is happening?
I'm running into an issue using path changing functions in HTML5.
I am making a simple test project that uses this code:
Create:
Code:
move_path = path_add();
path_set_closed(move_path, 0);
Code:
if (mouse_check_button_released(mb_left))
{
path_clear_points(move_path);
path_add_point(move_path, x, y, 100);
path_add_point(move_path, mouse_x, mouse_y, 100);
path_start(move_path, 5, 0, 0);
}
if (path_position == 1 && path_get_number(move_path) > 0)
{
path_end();
path_clear_points(move_path);
}
In Windows, when the mouse is clicked - the object moves to that location and stops.
In HTML5, when the mouse is clicked - the object simply vanishes.
I added this code to the Spacebar Pressed event:
Code:
show_message("X: " + string(x) + "#Y: " + string(y));
In HTML5 - the object outputs a value such as:
And an extra "NaN" is appended to the end of the value every time the mouse is clicked.X: 100100116.8341732483NaN
Y: 1009937.187918894826NaN
Any idea as to why this is happening?