ID:178896
![]() Mar 21 2002, 6:27 pm
|
|
I'm trying to set a turf square where when I pass over it, it changes a variable in the user's profile to that area. I tried the Enter process, but it makes the square solid. How would I do this to let the user walk over the square and change the area?
|
![]() Mar 21 2002, 6:28 pm
|
|
you will probely want to add ..() after your enter code
|
What I normally do and this is something you probably haven't even considered yet, is make both a Entered() and Exited() proc in the turf/
For instance this is how I set up my PK/NON-PK area, also can be used for location changes like Castle to Deep Forest. turf icon = 'ground.dmi' Entered(mob/M as mob) M.zone = "PK" Exited(mob/M as mob) M.zone = "Non-PK" Granted you must add the variable zone to your mob for this to work. What this does is makes the player's zone = "PK" which allows attacks in this area. If they leave the tile it changes them back to Non-PK status. If you want to make a bigger PK area just add tiles. Something I've learned to use that works better than tiles as the tiles you use may vary is to make good use of area/ Use the same code as I listed above just change turf to area instead. Also leave the icon, etc stuff blank. Don't put anything there. This way you'll have an invisiable area that can act like a tile and you can place over any tile in that area regardless of the turf used. If your doing something on a larger scale like changing from one make to the other, or a map warp. Then just besure to use Entered(mob/M as mob) in your code and M.yourvarhere <-- Var you wish to change. LJR |