mob
Bump(atom/movable/A)
if(A:type==/obj/coin)
usr<<sound('Coin.wav')
usr.coins++
del(A)
ID:168805
Aug 25 2005, 6:09 am
|
|
I was wondering how I can check if you are falling to South, then delete the obj? So far, it only delete when I bump from the sides, and the bottom. It should do that, but I don't want to have to press down just to delete the object. Right now, when I jump on the coins, they sit there, with me on top, unless I hit South().
|
First, stop using : & usr, and you should probably be using istype() instead of type==type.
|
In response to Ol' Yeller
|
|
What is better about istype()?
|
In response to CIB
|
|
istype() will return 1 if the type is in the pathtype. I'll give you an example
obj Just testing the specific type is useful if you want to know if it is the exact type. istype() is useful if you want to check if it is the type, because you might have subtypes of something. ~_~ I hope I made sense. ~~> Dragon Lord |
In response to Unknown Person
|
|
OK, I understand... I don't think that there are different types of coins though...
|
In response to CIB
|
|
CIB wrote:
Uh oh, you used a : operator(sees 1000 replies about it coming) And usr, too XD Hiead |
Uh oh, you used a : operator(sees 1000 replies about it coming)