Page 1 of 1

Request: A map gadget that makes area unbuildable

Posted: 02 Jan 2011, 23:56
by BaNa
I am working on a unique map but i would need some way of making predefined areas unbuildable on it (teleport exits, i dont want them porced up). Can somebody lend me a helping hand or even point me in the direction?

On a related note: Is there a way to kill air units via lua?

Re: Request: A map gadget that makes area unbuildable

Posted: 03 Jan 2011, 00:37
by Niobium

Code: Select all

Gadget:AllowCommand(unitID, unitDefID, unitTeam, cmdID, cmdParams, cmdOptions, cmdTag, synced)
If cmdID is less than 0 then it's a building, cmdParams will be {x, y, z, facing} which you can use to check if it is too close to something etc. There may be a way to do this via the map itself though, like very shallow water.

And for killing air:

Code: Select all

Spring.DestroyUnit
 ( number unitID,
   [boolean selfd = false,]
   [boolean reclaimed = false,]
   [number attackerID] ) -> nil

Re: Request: A map gadget that makes area unbuildable

Posted: 03 Jan 2011, 00:43
by BaNa
woohoo thanks!

Re: Request: A map gadget that makes area unbuildable

Posted: 03 Jan 2011, 01:08
by bobthedinosaur
wall map?

Re: Request: A map gadget that makes area unbuildable

Posted: 03 Jan 2011, 01:30
by Johannes
Niobium wrote:There may be a way to do this via the map itself though, like very shallow water.
I suggest doing that, if the map design permits. Not only is it easy to do for you, it's also very intuitive for player to see where the unbuildable area starts.

Re: Request: A map gadget that makes area unbuildable

Posted: 03 Jan 2011, 01:34
by BaNa
The map will be a voidwater map so the only way i could do it would be with perlin noise in heightmap but that would fuck up pathing.

I will make the textures distinct and write it out in description.

Re: Request: A map gadget that makes area unbuildable

Posted: 04 Jan 2011, 20:44
by knorke
there are some maps which do that i think..
ie that one circular map that comes up in every 3 player xta game, arctic blender or whats it called.

this one:
http://www.springfiles.com/spring/sprin ... ic-inferno