how would i prevent people from entering a certain area in my game?
i.e. in a few games ive played there are houses and the like where only one person (the owner) can enter
any suggestions at all would be really helpful
thank you
ID:171544
Sep 9 2004, 4:07 am
|
|
In response to Jik
|
|
thank you very much
ive tried using entered() but it checks after you actually enter the space which isnt good... |
In response to GunRunner
|
|
arrrrrrrrrgggggggggg i still cant get it to work dag nammit
|
In response to GunRunner
|
|
ok, try this then.
mob This adjustment to the Move() proc should stop a person if they try to walk over a door that they do not own. This only works if the doors have density of 0. if you want the doors to have a density of 1 then you would have to alter the if like this: if(istype(T, /turf/door/)) I'm no master but that's off the top of my head. If you don't want to change the turf (so no one else can follow) then you would have to find a way of making the mob move 2 spaces ahead on where he is (with src.loc = locate(x,y,z)) but that would depend on which what he/she was facing... Hope this gets you going... |
In response to Jik
|
|
thank you
muchly appreciated |
In response to GunRunner
|
|
GunRunner wrote:
thank you No problem. One of my long term projects may have to use the same kind of methods. So in helping you, I'm helping me! (That's why I read through this section alot) |
The advice you've recieved is completely wrong, because it completely ignores the proc specifically designed for this.
turf Also note that Enter() should not actually do anything on its own. Move() calls Enter() up and asks "Hey, can I come over to your place?" Enter then returns 0 to say, "No, man, my parents are home," returns 1 to say, "Oh, of course! Come on over!" or returns ..() to say, "Sure, if my door's unlocked." |
In response to Garthor
|
|
Like I said, I'm no master... =$
|
when you bump, check if the turf is a door turf. if it is, chekc if you are the owner of the door(for the door turf add a var called owner that holds the owners name)
this would be my guess.