ID:149084
 
The coins will NOT delete them selves when I jump to grab them, I have no clue why, its just too confusing....

atom/proc/Bumped()
mob
Bump(atom/A)
A.Bumped()
..()

obj
coin
icon = 'obj.dmi'
icon_state = "coin"
density = 1
Bumped()
usr.coins += 1
del(src)
I would like to know if you happened to alter your del proc, if not than this is a BYOND bug, because It has happened to me too, but with mobs.

Or you can alter it and do something like this

mob
Bump(atom/A)
if(A:type == /obj/coin)
usr.coins += 1
del(A)
obj
coin
icon = 'obj.dmi'
icon_state = "coin"
density = 1

Then again, if it is something with the del proc, you can take the cheap way out and do this
atom/proc/Bumped()
mob
Bump(atom/A)
A.Bumped()
..()

obj
coin
icon = 'obj.dmi'
icon_state = "coin"
density = 1
Bumped()
usr.coins += 1
src.icon = null
src = null


I hope this helps
--Ken--
Branks wrote:
The coins will NOT delete them selves when I jump to grab them, I have no clue why, its just too confusing....

atom/proc/Bumped()
mob
Bump(atom/A)
A.Bumped()
..()

In general practice, you should call Bumped(src), and set up Bumped() so it's Bumped(atom/movable/A).

obj
coin
icon = 'obj.dmi'
icon_state = "coin"
density = 1
Bumped()
usr.coins += 1
del(src)

That would make this:
obj/coin
Bumped(atom/movable/A)
if(ismob(A))
mob/M=A
if(M.client)
M.coins+=1
del(src)

I don't think this actually solves your problem, but it's much better code. If you have enemies moving around, they could grab coins and such, but the grab would be attributed to usr, which might not be correct. And if Bumped() is used to calculate whether the player is hurt, then two monsters bumping into each other would cause that same damage when usr is used.

Lummox JR