Latest Posts

Topic: lua: Get click position?

kaputtnik
Avatar
Topic Opener
Joined: 2013-02-18, 19:48
Posts: 2439
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2018-01-12, 20:25

Is it possible to obtain on which field/node a player has clicked?

Say i want to determine if an immovable stand on this field/node.

I can check which 'kind' of field_action window is open, but this gives me no information about the field itself. Especially for non building fields.


Fight simulator for Widelands:
https://wide-fighter.netlify.app/

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 14:56
Posts: 3324
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2018-01-17, 14:01

We don't have a Lua function for that yet - please open a bug report.


Busy indexing nil values

Top Quote
kaputtnik
Avatar
Topic Opener
Joined: 2013-02-18, 19:48
Posts: 2439
OS: Archlinux
Version: current master
Ranking
One Elder of Players
Location: Germany
Posted at: 2021-04-02, 18:31

Can't find any bug report so i don't know if i have written one face-grin.png

bug report with more ideas


Fight simulator for Widelands:
https://wide-fighter.netlify.app/

Top Quote