ID:178653
![]() Apr 20 2002, 9:01 am
|
|
ive been trying to figuire out how it works but nothing i try works i wanna make it so when u bump into like a sign it says something but i cant figure out how to make that work
|
Copyright © 2025 BYOND Software.
All rights reserved.
This is the format for Bump():
src.Bump(O)
(src is usually ommitted, but it is there.)
src is the thing that was trying to move.
O is the thing that stopped src from moving.
In your case, src would be the mob and O would be the sign. You want to override the MOB Bump() proc to catch when your player bumps into a sign.
mob
Bump(O)
if(istype(O,/obj/sign))
src << "You bumped into a sign."
You might also want to search the forums for postes that contain "Bumped()" in the body. I describe a more object oriented approach. I'll make a FAQ entry for this when I have a bit more time.