turf/signll
icon='grass.dmi'
icon_state="sign"
density=1
Bump(atom/truf/signll)
alert("The sign reads: Welcome to Liberty Lake!")
i get Bump is an undefined proc!?
ID:266547
Apr 6 2002, 4:42 am
|
|
In response to Skysaw
|
|
so if i made igt an obj would it work?
|
In response to Strange Kidd
|
|
Strange Kidd wrote:
so if i made igt an obj would it work? Use this: turf/signll It would be better for you to use this way. Lee |
In response to Strange Kidd
|
|
Nope. The obj doesn't bump into the mob, does it? The mob bumps into the obj which calls mob/Bump() not obj/Bump()
mob |
In response to Nadrew
|
|
This sort of thing happens often enough that it's become part of my standard library that gets added to every project I make.
atom proc Bumped(O) // O just Bump()ed into src. // prototype Bumped() proc for all atoms atom/movable Bump(atom/A) if(istype(A)) A.Bumped(src) // tell A that src bumped into it ..() Bumped() will automatically be called whenever anything Bump()s into something else (assuming you put a ..() somewhere in your own Bump() definitions). For signs, I just do something like this: turf/sign Bumped(O) // override Bumped() so it tells the Bumper what the sign says O << "The sign reads: [desc]" sign11 desc = "Welcome to Liberty Lake!" You can even alter the messages for each sign directly in the map editor, by editing the desc var. |
Bump is undefined for turfs. It is for movable atoms only. You don't really expect your turf to go bump into something do you?