I did not realize Bumped() was not built-in though...
It's right not there, in the reference.
Many authors add Bumped() themselves as a shortcut, because usually this is the preferred way to handle it.
But your last paragraph is more what i'm saying. You can put anything you want there, but it's not going to use it like it would a normal parameter, it's just a direct pointer.
That's not what I said at all. I'm really not even sure what you're talking about.
What i mean is, if I have the proc Attack(mob/M), it won't let me use that on a turf or whatever because it's an invalid parameter.
Wrong. BYOND does no strict type checking until it actually goes to access the vars or procs. You could pass a turf to M and it would work fine until you tried to call M.Move(). This would result in a runtime error.
Setting the var as mob/M only advises DM that it's a /mob type, so using the . operator on mob vars and procs is fine.
But if I use Entered(mob/pc/M) it will still let mob/monster enter it AND it will still execute the contents as if it were mob/pc/M. The only thing I gain is a pointer to mob/pc.
That part is true. And as long as you use vars that are common to /mob, you'll be fine.
I was having difficulties with this when I threw some monsters into my town to test combat. I had to rewrite every area that required a var check ( I just commented it out ) so that it wouldn't crash the proc and I could actually test it.
I noticed something else too, when my AI was wandering and the Entered() proc crashed ,the AI would stop right there with my exit message. Kind of odd eh?
If you don't spawn out Move(), and one of the procs it calls ends up crashing, the whole "thread" will die. This is why it would stop for you.
Lummox JR
But your last paragraph is more what i'm saying. You can put anything you want there, but it's not going to use it like it would a normal parameter, it's just a direct pointer.
What i mean is, if I have the proc Attack(mob/M), it won't let me use that on a turf or whatever because it's an invalid parameter.
But if I use Entered(mob/pc/M) it will still let mob/monster enter it AND it will still execute the contents as if it were mob/pc/M. The only thing I gain is a pointer to mob/pc.
I was having difficulties with this when I threw some monsters into my town to test combat. I had to rewrite every area that required a var check ( I just commented it out ) so that it wouldn't crash the proc and I could actually test it.
I noticed something else too, when my AI was wandering and the Entered() proc crashed ,the AI would stop right there with my exit message. Kind of odd eh?