ID:162383
 
I'm wondering how exactly a proc works, like is there an instance created of that proc when called, is the instance deleted once the proc finishes? will a variable in a proc be redefined every time the proc is called or does it stay the same from last time i used the proc. if mob/a used proc/attack() then mob/b used it before it could finish for a, would it use what it had already for b? Sorry if this is these are dumb questions, i just want to learn more about it thats all.
http://developer.byond.com/docs/guide/chap06.html

Procs are not objects; in fact, the concept of them predates object-oriented languages entirely. They are a chunk of code that is executed, nothing more, nothing less. Procs aren't created or deleted, they don't influence one another, and the same proc can run as many times as you want without interrupting one another... unless if you want them to. Variables within a proc go out-of-scope (and are thus deleted) once the proc ends.
In response to Garthor
Thank you!