Hi ppls long time no see, been working on school lately so i havent been able to code.
any ways, i was wondering how I would go about checking for a specific obj in a turf whenever a mob moves. I know I should know how to do this by now, but like i said, i havent touch BYOND in a while.
thanks
~~~Albire
ID:166851
![]() Jun 7 2006, 12:11 am
|
|
![]() Jun 7 2006, 5:04 am
|
|
The turf their moving to or what?
|
Like this?
turf/Entered(mob/M) --Vito |
ok, thank you both for your help, though I have run into a new issue. I took what you gave me and made a code, it worked, but had a bug in it that i had to fix. so I morphed it into a move proc and got this, but the screen is black when it starts up. any ideas?
mob thanks again ~~Albire |
mob Better. You forgot the ..() which is why the screen was blank. Also fixed up a bit more. You can see using if(!o) is better then using if(o) then an else if you have nothing to do if o is there. |
You might also want to use step(src,SOUTH) instead of the loc = locate() statement. If somebody already at the bottom of the map "falls", they will fall into a null location since their y will be 0.
Always remember to fit the ..() procedure into built-in procs in any case where it should work as usual. ..() means "do what usually happens". |