Well i kinda new to lua, but i was wondering how i would set multiply zones with lua with different vectors and give them names. Any help would be much appreciated. Thx.
[highlight](User was banned for this post ("Questions go on the questions subforum" - Gran PC))[/highlight]
Something like [b][url=http://luasearch.netau.net/?list=findinbox&func=ents.FindInBox]ents.FindInBox [img]http://luasearch.netau.net/media/favicon.png[/img][/url][/b]?
I'd recommend creating a brush entity though.
Yeah. Expanding on what Nerdeboy said, if I understand you correctly, you want to split the map up into "cells" basically, where each cell has a different unique name that you can refer to it as.
Assuming you want these cells to be evenly-spaced, I would set up a system where you just iterate through the map-size (you can establish this with text-files, a special map entity, or some traces up at the skybox, as long as the skybox isn't too complex) with even spacing, and then just make logical boxes stored in a table - starting x-value, starting y-value, starting z-value (if you want to partition it along 3 dimensions... I'd stick with two, personally.) and the name of that cell.
Since the spacing is a constant, no need to store that, too.
Then, if you want to, for example, find all entities within a zone, you just ents.FindInBox with the cell's starting coordinates, then it's ending coordinates with the spacing constant added to it.
thx alot.
Sorry, you need to Log In to post a reply to this thread.