I've asked some questions before about this, but I haven't had my answer, answered accurately, and I believe that has to do with the fact that my question was a little off..
So here I go again. ^_^ I think I got it right this time. :)
Here is my situation:
Attack()
set src in oview(1)
..()
var/adamage = usr.ATK - src.DEF
if(adamage > 0)
usr << "You hit [src] with [adamage] damage!</BR></BR>"
src.HP -= adamage
var/bdamage = src.ATK - usr./DEF
usr << "[src] hits you back with [adamage] damage!</BR></BR>"
usr.HP -= adamage
Deathcheck()
sleep(100)
else
usr << "[src] misses its attack!</BR></BR>"
var/bdamage = src.ATK - usr./DEF
usr << "[src] hits you back with [adamage] damage!</BR></BR>"
usr.HP -= adamage
Deathcheck()
sleep(100)
Now, I've given the bugs their own, DEF, ATK, and HP variables, and I've given the user's variables as well..
What I keep getting as an error now, is that the variable, DEF, ATK, and HP are undefined variables.
I've already defined them.
Now here's my question:
"How do I call variables from other objects, mobs, etc. so that I can use them in verbs, procs, variables, etc.?"
Well there are many many many ways to do what your asking
Hope that answers your question, if not maybe it will help you re-phrase your question so that we can better answer it.
-KirbyAllStar