obj/Gate
Gate
name="Crystal Quest";
icon = 'Tiles.dmi'
icon_state = "gate"
density=1
Bump()
set background = 1
src.density = 0
flick("gateo",src)
sleep(25)
src.density = 1
Its not sensing the bump from a mob.
ID:262975
Feb 27 2006, 8:10 am
|
|
obj/Gate Its not sensing the bump from a mob. |
In response to SuperSaiyanGokuX
|
|
Look up
Enter In the DM Reference Edit: ignore that i kinda posted in wrong topic... |
In response to Yorae
|
|
I don't know if that's necessary... Yeah, you can set up your own Bump()-like system by overriding Enter(), but since BYOND has one built right in, you might as well just use that...
|
What you need to do for a proper bump system is add in your own Bumped() proc (an arbitrary name, but it's the most fitting) under the atom/movable type (atom/movable is any type of atom that can move; mobs and objs), and override atom/movable/Bump() to call the Bumped() of the thing being bumped into...
Luckily, Bump()'s default argument is the thing being bumped, so you can just program it as follows:
Now, change your gate's Bump() into a Bumped() and it will work...
You'll notice I'm also passing the bumper as an argument in our new Bumped() proc... This is handy if you want to use your objs' Bumped() procs to refer to the mob that bumped into them (like to put a bumped item into the bumper's contents, display a message to the bumper, etc)