Does this issue occur in the editor or during gameplay? if it occurs during gameplay, please specify which movement system is being used (free movement or grid movement):
Briefly describe the issue you're experiencing:
When you use request_coordinate()
in a loop and open a widget you can move the widget around until you click on a tile. Once you click on a tile, the widget is no longer in focus. The only way to close the widget or move it around again is if you hide and show it again.
Are there any errors in the in-game debug console or external console window?
Provide the steps necessary to reproduce the issue:
make the following script request_coord
:
$request = request_coordinate(player.coord.z, 0, 0, 0);
if $request != null then
log_message($request);
end;
wait(0.1);
execute_script("request_coord");
Make a script to handle opening and closing the inventory, open_inventory
:
if global.property["show_inv"] == false then
global.property["show_inv"] = true;
show_widget("inventory");
else
global.property["show_inv"] = false;
hide_widget("inventory");
end;
2.5. Set the Keybind [ I ]
to script open_inventory
.
add execute_script("request_coord")
to your startup script.
In-game you should be already seeing request_coordinate()
active. Open the inventory using keybind [ I ]
.
4.5. Move the Inventory around
Click on a tile.
Try to move the inventory widget around.
2 minute video:
📁 Request_Coordinate.zip
Additional Information:
When combining request_coordinate()
, cursor.target
and widgets
together.
Similar behavior happens. You are not able to use cursor.target
on the widget when request_coordinate()
is active.
I've attempted to do this to stop the request_coordinate()
using perform_action("back")
, but the target does not update.