ID:177845
Jul 23 2002, 8:24 am
|
|
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.
|
Copyright © 2024 BYOND Software.
All rights reserved.
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:
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 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