ID:177845
 
i need coding to make a portal that allows only player with a certain level or higher to enter. If not the coding just explain how I could do this.
Codesterz wrote:
i need coding to make a portal that allows only player with a certain level or higher to enter. If not the coding just explain how I could do this.

If the portal is a turf, you could override its Enter() proc. Someone at some point is going to provide a bad code example that includes usr, so ignore it and give them a slap when that happens.

Anyway, your basic Enter() proc will look like this:
turf/special
Enter(atom/movable/A)
if(ismob(A))
var/mob/M=A
... // do something
return ..()

Basically all you need to do in there is check M's level; if it's higher than the threshold you set, return 1 (allowing entry), or 0 (no entry). You can use this technique for areas as well as turfs. If you want non-player mobs to pass through, use this line:
if(!M.client) return ..()

If the turf is a teleporter, then you'll also need to put in an Entered() proc for after they step on the turf, and that should do the teleporting.

Lummox JR
wow, you've been pretty needy this week!
In response to Ter13
First Attempt on a byond game
In response to Codesterz
lol, good luck, I gave up on making games... except 1... but as for that, I'd have to say... take it easy, if you take on too much at once, you're bound to give up.