It would be called when it was well, Bumped by something!
mob
Blind_Man
Bumped()
oview(src) << "[src]: Hey Who Bumped me!?"
This could be very usefull in alot of cases, intead of writing code for another object inside something elses Bump.
ID:259961
![]() Jun 19 2005, 4:54 pm (Edited on Jun 20 2005, 7:34 am)
|
|
It would be nice if a Bumped() type thing was created.
It would be called when it was well, Bumped by something! mob This could be very usefull in alot of cases, intead of writing code for another object inside something elses Bump. |
![]() Jun 19 2005, 4:54 pm
|
|
Your code contains usr abuse, which is a very bad way to use Bumped()!
|
Sniper Joe wrote:
.....There is..NO USR IN MY CODE!!! Sure there is. view() is really view(usr). usr is the default target for view(). Bumped() is a very easy procedure to program yourself in DM. There are tons of threads in the forums about it. |
Yes there is, view(), oview(), alert(), and input() (Probably a few others which I forgot) all default to usr.
|
Actually in view() and the sort it works fine, I've never had to use view(src) in a proc, always works 100% OK, and since he didn't use 'usr' persay he's not really doing anything wrong.
|
I think that adding the Bumped() case would be good
heres how I think it could work. case 1, - Atom "A" bumps into Atom "B" - "A" does not have a bump code but "B" has a bumped code B's bumped code runs. case 2, - Atom "A" bumps into Atom "B" - "A" has a bump code "B" has a bumped code A's bump code runs then B's bumped code is run. thou I would stay with my bump code ^_^ |
atom/movable |
that all well and good, but if it was its own thing then you could define how each of them react without loads of checks
(still this is how I think the system works not sure i dont use bump that much) // I think its usr in the Bump case ^_^ not sure so I left it as src :) or something like that ^_^, it be funny you could have a NPC yell at the dog for walking into it :) |
:) I just am thinking of some ideas to make BYOND a big easyer....may that be a good or bad thing >_<
|
Nadrew wrote:
since he didn't use 'usr' persay he's not really doing anything wrong. Um, yes he did... view(usr) == view() And if the above is not true, then the DM reference needs to be slapped (and updated). |
That's exactly how the code I posted should work.
Copy+Paste what you you just wrote, edit the view() usr mishaps, then try it out. |
A long time ago a great man named Dan fixed that problem, and the fix was good! (Procs with a default 'usr' are 100% valid in procs since that time as long as you don't do something like view(usr))
|