I'd like an event to fire when a player enters an area in the world or steps on a tile. Possibly I can do this using "named areas" via the map editor. I'm currently doing this via a handler that watches where the player moves (on_player_changed_position).
How exactly do I use named areas/positions created within the map editor? I can certainly create them. Now how to I get an event when a player walks/drives into them? Is this what they can do? Which event receives them?
using a wiki search for "map editor"
https://wiki.factorio.com/Map_editor
and found this:
Any examples? Since its easy I'd expect this to be trivial. I can't find anything in lua-api.factorio.com for responding to named areas.Areas and positions
The area and position editor mode allows to create positions and areas in the world that can be named. These can then be easily accessed in scripts.
So specific questions:
1) How exactly do I use the areas named in the map editor?
2) The map editor has a lua script area. What is this about? Can I put a control.lua code in here to set up a event handler?
thanks