ID:168805
 
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().

mob
Bump(atom/movable/A)
if(A:type==/obj/coin)
usr<<sound('Coin.wav')
usr.coins++
del(A)
That won't help us. You have to post how they fall, so we see why it sits just on it.
Uh oh, you used a : operator(sees 1000 replies about it coming)
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
blah
another_blah
test

mob/verb/test()
var/obj/blah/test/T = new ()
if(istype(T, /obj/blah)) // will return 1
src << "Congrats"
if(T.type == /obj/blah) // will return 0
src << "You will never see this message!"


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