ID:174279
Sep 3 2003, 8:20 pm
|
|
I need code for doors and signs. I've tried many different ways. Of course I'll be modifying what you post to be able to jam into my ["If-I-have-to-debug-another-line-I'll-explode"] code. Thanks.
|
Sep 4 2003, 12:15 am (Edited on Jan 8 2009, 4:59 pm)
|
|
In response to Dracimor
|
|
Thanks, but the part I was really wondering abuot is how to get the object to notice you bumped into it. I used to this that the Bump() procedure was for that, but it's about the opposite of that. I was going to try to use Enter(), but snice I'm going to be using objects, that wouldn't work. I'm looking for signs and doors like the ones in Builder's Fantasy for example. If anyone has code that works like that, could you post that section of the sorce? It doesn't have to be commented. Just so I get the idea of how to go about doing what I asked.
|
In response to Yota
|
|
Bump() applies to the thing doing the bumping.
Bumped() applies to the thing being bumped. Enter() applies to the thing being entered an returns a 0 or 1 if it can or can't be entered, respectively. Entered() also applies to the thing being entered and is code that's executed when the thing's Enter() is called successfully. I'm pretty sure this is correct. However, If I screwed any of that up, just remember I'm a newbie too ;) |
In response to Edhrid
|
|
Edhrid wrote:
Bumped() applies to the thing being bumped. Bumped() doesn't actually exist; you have to define it yourself. Something like this would work: <code>atom/proc/Bumped(O) src << "[O] bumped you" atom/movable/Bump(atom/O) O.Bumped(src)</code> |
In response to Crispy
|
|
That's the key. Thanks. Here's how I'll modify it.
atom That should work. |