ID:164930
 
Is it possible that when someone is done making a character, it sends them to a map and no one else can join? I mean something like each player gets sent to his own world that is exactly the same. Just tell me if you want me to be clearer.
You could make a procedure to check from one location to another to see if it's in use.
proc/is_in_use(atom/low,atom/high)
var/list/block = block(low,high)
for(var/atom/a in block) for(var/atom/b in a) if(istype(b,/mob) && b:client)) return 1
return 0
In response to Popisfizzy
Can you describe it a little more? I'm not sure what it does.
In response to DarkD3vil666
If a mob with a client is within the block from atom/low to atom/high, it will return 1 (meaning it's in use). Otherwise, it will return 0 (not in use).
In response to Popisfizzy
Does that mean only a limited amount of people can join?
In response to DarkD3vil666
I don't know if you meant something different, but you said to transfer them to a map where no one else is at. You use the code I gave you to transfer them to somewhere no one else is at (the code doesn't do exactly that, but you can utilize it elsewhere to do so).
In response to DarkD3vil666
Basically, yes.
If you use that system, you will always have a limited amount of players.

You have to personally build each map (unless you use something like one of the map loaders), which means there will be a limited number of them.

If you want it to be an online world where people can communicate, but the game is played by yourself, then you will probably have to use a system like that.

If you want it just to be plain single player, add something that won't allow new connections to the game, and make sure the executable resource is downloadable.
In response to Keeth
One more thing. Then is it possible to disable the host button on the game once downloaded?

If not, I can always use a var to allow only one player at a time.
In response to DarkD3vil666
I'm not sure there's a way to actually disable the client's button, but you should be able to disable the opening of ports.

world/OpenPort(port)
return
In response to Keeth
Can areas have vars? If so..
area
var
limit

area
first
second

mob
proc
thingy()
var/area/first/a
if(a.limit==1)
src.loc = /area/first
else
src.loc = /area/second

Of course, you will need to edit stuff...Should work.
In response to Revojake
Yes, but as far as I see, I would need more then 1 map for this and I don't want to do that. Thanks anyways. I kind of have it solved. I'll just make it downloadable and have it so if someone hosts it, make sure no one can join his/her game.

Thanks for everyone that helped.
In response to DarkD3vil666
Well..You could do one map. With alot of Z levels? Make the areas define where they should go. Owell! I see that you solved it.