Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if !instance_position(dmxg, dmyg, oGBuild)
- {
- if fcell == noone
- {
- fcell = mouse_x div CellWidth + mouse_y div CellWidth * ds_grid_width(global.grid)
- char = instance_position(mouse_x div CellWidth * CellWidth + 16, mouse_y div CellHeight * CellHeight + 16, oCharPlayer)
- }
- else if fcell != noone and scell == noone and !instance_position(mouse_x, mouse_y, oCharPlayer)
- {
- scell = mouse_x div CellWidth + mouse_y div CellWidth * ds_grid_width(global.grid)
- path = find_path(fcell, scell)
- if char != noone and path != noone
- {
- with char
- {
- path = scrReverseArray(other.path);
- event_user(0);
- }
- char = noone
- }
- }
- else
- {
- fcell = noone
- scell = noone
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement