Problem description:
How do I make it so a user randomly spawns in one of the four corners of the map? (my map is 40x40)
ID:141865
Oct 18 2008, 5:15 pm
|
|
Oct 18 2008, 6:50 pm
|
|
If it's 40x40x1:
|
In response to Popisfizzy
|
|
Thanks.
Another question: What's the code for spawning at a random turf? |
In response to MaxPK
|
|
You can use lists containing each turf.
var/list/turfs=list() |
In response to Kaiochao
|
|
Or you know..
loc = locate(rand(1,40),rand(1,40),1) |
In response to Andre-g1
|
|
Basically the same thing Pop said, except including everything in between..
|
I'd prefer to make invisible turfs of X type that are always spawn points. They can be placed anywhere.
var/spawn_count = 0 |
In response to Kaiochao
|
|
What about random spawning only at non dense turfs?
|
In response to MaxPK
|
|
I actually forgot about the block() procedure, and I used it in a project just yesterday :P
block() returns a list of turfs in a 3D "block" of space on the map. So, using the way I said earlier... var/list/turfs=block(locate(1,1,1),locate(40,40,1)) //All turfs within the block Or if you want to check if there are any dense objects in the turf... //The allclear() proc. Checks if a turf is undense and anything in it is undense. |