obj/Bonusitem2
Entered()
src.Move(usr)
usr <<"You collect a Bonus Item!"
when i go to the middle of the item it doesn't go to the users inventory
ID:178147
Jun 14 2002, 6:02 am
|
|
In response to Lummox JR
|
|
huh?
|
In response to ShadowSiientx
|
|
Put density to 1 and use Bump() proc
|
In response to Super16
|
|
i don't understand bump.. only enter()...and entered()...
|
In response to ShadowSiientx
|
|
Bump(atom/Obstacle)?
|
In response to Lummox JR
|
|
sorry to like post alot, but i put mob/M then used M beside every message. but said M.Und var.
|
In response to ShadowSiientx
|
|
ShadowSiientx wrote:
sorry to like post alot, but i put mob/M then used M beside every message. but said M.Und var. My guess is you didn't actually specify M as the argument for Entered(), but I'd have to see your modified code to know for sure. Lummox JR |
This is wrong on many, many levels. The first thing you have to do is stop using usr in Entered(). This is extremely bad form and simply doesn't work robustly.
The other problem you're having is that Entered() is called when the usr steps on a turf, and it's called for the turf, not for the atoms already on it. turf.Entered(M) needs to loop through bonus items in its contents and give them to M, provided M is a mob who's also a player. (Under no circumstances whatsoever should it be usr.) obj.Entered() would only be called if the player got inside like it was a vehicle, which is why it isn't being called for you.
Lummox JR