ID:269582
 
I made a verb, and it worked. So then I changed mob/verb to mob/proc and it didn't work when I called it. Do they work the same way? Is it a problem with the coding, or the way I did it?
When using mob/verb all calling should use usr, but when you flip it all usr should be changed to src.
Yes they do essentially work the same. There isn't any real difference.
In response to Cheetoz
When using mob/verb all calling should use usr, but when you flip it all usr should be changed to src.

Uh no. You should understand what usr and src are and use them according to when they are needed. Just swapping them arround because you don't know better will just lead to problems.
I made a verb, and it worked. So then I changed mob/verb to mob/proc and it didn't work when I called it. Do they work the same way? Is it a problem with the coding, or the way I did it?

verbs are essentially procs you are letting the player call directly by default. If when you changed a verb to a proc and it didn't work right is likely because of how you called the proc and whether or not you used usr.
They are essentially the same, verbs are just more accessible to the players. Also, right-clicking on something will show the verbs it contains, but not the procs.

However:
mob
verb/Test()
src << "Testing!"
proc/Test2()
src << "Testing!" // Same body


Calling mob.Test will provide the same results as mob.Test2(Note: Don't actually use mob.Test; it should be something like src.Test, M.Test, etc.)

Of course, the player is provided no way of directly calling Test2, whereas Test will appear in the verb panel.

Also, ignore Cheetoz's post- he's talking nonsense. In a verb it is still much better to use src. As is the case with procs.

Hiead
In response to Hiead
Also, you can add procs to an atom's verb list if you want them to have access to them only at certain times.

src.verbs.Add(/mob/proc/Plap())