ID:271000
Dec 5 2006, 12:07 pm
|
|
How do you make an area, turf, or obj that only people with a certain var can cross, with it being in the same Z and being able to be reached by everyone, but not be passed by everyone.
|
You, my fellow BYONDian, want Enter().
Now, Enter(), along with other movement procs need something VERY important: SAFETY CHECK!!! If you put mob/M or somehting similar in the argument [Enter(mob/M)], it will NOT LOOK FOR THAT PATH... meaning it will classify even an obj as M, so use ismob()/istype()/etc. Oh, and IT MUST NEVER use 'usr'!! More info: http://www.byond.com/docs/guide/chap07.html [Section 1] - GhostAnime |
In response to GhostAnime
|
|
I tried it, but I can still go through it even with the certain var.
|
In response to Super Mario Productions
|
|
turf/Mirror/Enter(mob/person/M) //This will NOT look for mob/person - GhostAnime |
In response to GhostAnime
|
|
I can still go through even with the var.
turf/ANBLOCKER/Enter(mob/M) //This will NOT look for mob/person |
In response to Super Mario Productions
|
|
turf/ANBLOCKER/Enter(mob/M) //This will NOT look for mob/person |
In response to Jp
|
|
I can still go through.
|
In response to Super Mario Productions
|
|
Anyone going to help me? >.<
|
In response to Super Mario Productions
|
|
You do realize that you only waited 2 hours and that everyone is not always online and have lives in which they need to attend.
"Patience is a virtue" - Somebody annoyed by the impatience of others |
In response to KirbyAllStar
|
|
Ditto Kirby.
SPM, show us your latest snippet please. - GhostAnime |
In response to GhostAnime
|
|
/////////////////////// ~ Madjarjarbinks EDIT: I know that it's setting the var right for the mob. |
In response to Super Mario Productions
|
|
Super Mario Productions wrote:
> /////////////////////// ~ Madjarjarbinks area/ANBLOCKER/Enter(mob/M) |
In response to Bobthehobo
|
|
Bob, you have it completely in reverse... -.-
|
In response to Super Mario Productions
|
|
So you want H.Bequipped to be false?
area/ANBLOCKER/Enter(mob/M) |
In response to Bobthehobo
|
|
No no no no no! return 0 and return ..()!
You don't want people being able to walk over anything on that space! |
In response to Jp
|
|
Thanks for the help, guys.
|
Use Enter()
Look up Enter(), Entered(), Exit(), and Exited()...
Note on areas: Once you successfully enter one and do not exit, if the variable that allows/disallows access changes, you can still move around that area. (assuming the area you want to use will take up multiple tiles)Once you exit though, the variable will be checked again.
For objs:
Use mob/Bump()
Have the var checkerand step operation there.