ID:180850
 
And once that mob, say, catches the player, how do you send that player back to start?

No matter how hard I try, I cannot get a bumped mob to display a message. Bleah.
On 1/28/01 5:28 pm Sairo wrote:
No matter how hard I try, I cannot get a bumped mob to display a message. Bleah.

Why don't you post the code you are using, and we can help you to get it to work.
In response to Deadron (#1)
mob/ring
Bumped(mob/M)
view(src) << "Hello!"
src.dir = turn(M.dir,180)

That's basically it; ignore the indentation mistakes, because I just jotted that down.
In response to Sairo (#2)
On 1/28/01 7:15 pm Sairo wrote:
mob/ring
Bumped(mob/M)
view(src) << "Hello!"
src.dir = turn(M.dir,180)

That's basically it; ignore the indentation mistakes, because I just jotted that down.


Sorry I may have missed this post for a bit (standard grumbling about thread-based forums here) --

There are a couple of things to make sure of:

First, have to make sure that you are calling the Bumped() proc. BYOND doesn't know anything about Bumped(), so you have to call it yourself when something is bumped. The proc that BYOND does know about is Bump(), for the mob that bumps into something. So the code to have there is:

mob
Bump(O)
// I bumped something, so let it know.
// Use a colon : operator here, which means that no matter what kind of thing I bumped, it's proc will be called if it has one.
O:Bumped(src)

Next, because Bumped() is a new proc that BYOND doesn't know anything about yet, to make things simple we declare it under mob/proc:

mob
proc
Bumped()
// For subclasses to fill out.
return

Now any subclass of mob can provide a Bumped() function without having to put it under proc, because BYOND already knows about it for mobs. (This is probably confusing...don't worry too much about it.)

Now your code above should work. Let me know.