Very simply, I need a new method to block when a building can be built within an area, implemented via LUA.
How would this work?
1. User places a building of type X, Y or Z.
2. If User attempts to place the building within X radius of an existing building of type X, Y or Z, then the LUA rules should prevent this from happening, while also giving feedback to the user.
3. Friendly buildings with this type of blocking should show the area blocked, if they are selected, as a shaded circle, to aid users in placing their buildings. Hostile buildings would just return a console message, i.e. "enemy building is too close", etc.
Ideally, this set of rules could be made flexible, per building- some should block a larger area than others.
Needed: a new building-blocking method
Moderator: Moderators
LuaRules, it would be a simple gadget.
Spring.GetUnitsInCylinder()
Spring.GetUnitsInSphere()
Spring.GetUnitsInRectangle()
AllowCommand() call-in
AllowUnitCreation() call-in
Use the FBI [CUSTOMPARAMS] section to configure units if
you like FBIs, otherwise use a lua config file (folks who know a
little lua would probably prefer using a lua file, it's a better format).
Spring.GetUnitsInCylinder()
Spring.GetUnitsInSphere()
Spring.GetUnitsInRectangle()
AllowCommand() call-in
AllowUnitCreation() call-in
Use the FBI [CUSTOMPARAMS] section to configure units if
you like FBIs, otherwise use a lua config file (folks who know a
little lua would probably prefer using a lua file, it's a better format).