because ive never been able to make it work?
maybe because objects think they enter themselves? whatever the reason ive heard people ask me to use it for objects but it never works
ID:1897325
Jul 16 2015, 9:22 am
|
|
Jul 16 2015, 9:23 am
|
|
works with turfs though every single time with no problem
|
Yes, Enter() and Entered() work with with objs, but remember what that actually means: atom.Enter(movable) is called whenever a movable tries to move into an atom's contents via Move(). Entered() is called when it's successful.
If you have, say, a trap defined as an obj, trap.Enter() will not be called when you step on it. This is because the mob stepping on the trap is not entering the trap's contents; it's entering the turf's contents, and the trap is also part of those contents. What you want instead is Cross() and Crossed(). Alternatively, there's the old-school method of overriding turf.Enter() or turf.Entered() and looking for traps to trigger. |