I would like to designate an area like coordinate x,y to coordinate a,b and then disallow building certain entities in that area. Is this possible?
Also, it is possible to allow building an assembler, but disallow setting certain recipes within the designated area?
The mod is for a scenario, if that helps.
Does anyone know how to do this?
Thanks!
Designate allowed building area
Re: Designate allowed building area
You can try setting-up a different LuaForce and Surface to achieve separate Tech trees & play areas. This would be great for a “Rocket Race” amongst multiple teams.
I don’t think there is an explicit way to dis/allow a given Force from building Entities on the same Surface, if they are able to reach it & have the materials available. But you can have separate Spawn Points per Force. If the Terrain can separate players for long enough (water works good; make sure to disable Landfill technology in your Scenario!) you can make a Team Combat map.
Good Luck! I always like seeing new Scenario mods; there aren’t very many compared to the amount of Recipe Tweaks etc.
I don’t think there is an explicit way to dis/allow a given Force from building Entities on the same Surface, if they are able to reach it & have the materials available. But you can have separate Spawn Points per Force. If the Terrain can separate players for long enough (water works good; make sure to disable Landfill technology in your Scenario!) you can make a Team Combat map.
Good Luck! I always like seeing new Scenario mods; there aren’t very many compared to the amount of Recipe Tweaks etc.
Re: Designate allowed building area
OK I was afraid of this. So the next best thing would be to script the deletion of disallowed entities from a given area. To do this without pissing off the player would require the areas to be visible somehow.
Is this possible?
Is this possible?
Re: Designate allowed building area
You can draw a color tint on this certain area using rendering
Re: Designate allowed building area
Sure is! To dis/allow entities you will need to use the Events API to listen for the various Entity changes, most importantly is probably on_entity_built; which even allows a Filter.adam_bise wrote: Sat Mar 15, 2025 5:35 pm OK I was afraid of this. So the next best thing would be to script the deletion of disallowed entities from a given area. To do this without pissing off the player would require the areas to be visible somehow.
Is this possible?
Depending upon the flavor of your scenario you can use Hazard Colored Concrete, Water, or Cliffs to draw a bounding box around the “Area” you have defined. A custom map generator or starting with a Lab/Grass terrain is probably easiest.
Re: Designate allowed building area
That'll work. Thanks for the info!