A
Anthony Summers
Guest
xx = self.x;
yy= self.y;
player = playerTactical.selected);
with(player){
path = path_add();
path_add_point(path, playerTactical.selected.x, playerTactical.selected.y, 100);
show_message(string(playerTactical.selected.x) + ": " + string(xx));
path_add_point(path, xx, yy, 100);
path_start(path, 16, path_action_stop, 0);
}
This code is in the event of the left click for an object. When you click the object it makes a player walk to it. However I'm having an issue. As shown with my show_message statement both of my x values reveal to be the same. The player however is much farther both y and x.
I made xx equal the objects x position before we went into the with statement as I believed that would mess it up. However it still shows the object and the player having the same x position.
What is happening?
yy= self.y;
player = playerTactical.selected);
with(player){
path = path_add();
path_add_point(path, playerTactical.selected.x, playerTactical.selected.y, 100);
show_message(string(playerTactical.selected.x) + ": " + string(xx));
path_add_point(path, xx, yy, 100);
path_start(path, 16, path_action_stop, 0);
}
This code is in the event of the left click for an object. When you click the object it makes a player walk to it. However I'm having an issue. As shown with my show_message statement both of my x values reveal to be the same. The player however is much farther both y and x.
I made xx equal the objects x position before we went into the with statement as I believed that would mess it up. However it still shows the object and the player having the same x position.
What is happening?