ID:136556
 
Will those procs ever begin to work for OBJs? Because I REALLY need that because I don't like areas for that because they get in the way because in my game, the areas can be deleted, but they are always deleted all at once, regardless.
Here's a workaround:

turf
Entered(mob/M)
if(ismob(M))
for(var/obj/O in src.contents)//loop over all objects on the turf
if(istype(O,/obj/someobj))
M << "There's \an [O] on [src]!"
break
In response to Nadrew
Never thought of that...Thanks, Nadrew.
Hanns wrote:
Will those procs ever begin to work for OBJs? Because I REALLY need that because I don't like areas for that because they get in the way because in my game, the areas can be deleted, but they are always deleted all at once, regardless.

I don't quite understand the complaint. As far as I know, these procs work for all /atom types, eg:
obj/Entered()
usr << "Entered [src]!"

mob/verb/moveobj()
var/obj/O = new(usr.loc)
Move(O) // will output "Entered obj!"
In response to Tom
Tom wrote:

I don't quite understand the complaint. As far as I know, these procs work for all /atom types, eg:
> obj/Entered()
> usr << "Entered [src]!"
>
> mob/verb/moveobj()
> var/obj/O = new(usr.loc)
> Move(O) // will output "Entered obj!"
>


Hmm...This didn't really work for my Bullies and Nerds game..

obj/splatter
name = "Lunch Splatter"
icon = 'turfs.dmi'
icon_state = "Splatter"
Entered(mob/M)
if(ismob(M))



Then the procedures for what it's supposed to do..But nothing happened.

In response to Hanns
Hanns wrote:
Tom wrote:

I don't quite understand the complaint. As far as I know, these procs work for all /atom types, eg:
> > obj/Entered()
> > usr << "Entered [src]!"
> >
> > mob/verb/moveobj()
> > var/obj/O = new(usr.loc)
> > Move(O) // will output "Entered obj!"
> >

Hmm...This didn't really work for my Bullies and Nerds game..

Is the mob moving onto the object, or into the object? Entered() will only be called when mob.loc == obj, after the movement. Your mobs are probably sitting on turfs, in which case Nadrew's workaround should suffice. But if your mobs are actually going into the objs and Entered() is not being called, something is fishy.
In response to Tom
The only time obj/Enter\ed() is called is when the mob is directly Move()ed onto the obj, any other time the turf inwhich the obj is contained's Enter\ed() proc is called, and the obj's Enter\ed() proc remains uncalled.
In response to Hanns
Are you using Move()? I believe if you set loc directly, Enter() is not called. Not sure on the behavior for Entered() though. This is spelled out in the reference for Exited(), but not for the other two.
In response to Hanns