is there a way to list all the variabls in a mob like with a for loop? Like to list a mobs contents youd do
for(var/o in usr) and then usr << o to list everything in the usr so can I do somethin similiar for vars? Like usr/vars or anything like that? I want to for loop thru every variable in the usr's mob how would I go about doing it?
ID:174049
Oct 7 2003, 11:46 pm
|
|
Oct 7 2003, 11:49 pm
|
|
"usr" is a var, is it not? =) Except that it's referencing a mob, so you're actually looping through "usr.contents" (which is a list). Any list can be looped through in this way. This includes <code>usr.contents</code>, <code>usr.vars</code>, and even lists that you make yourself (like <code>var/list/mylist=list()</code> for example).
|
In response to Crispy
|
|
see I think you said it by accident but usr.vars was exactly what I was lookin for. I know all about loopin and stuff what I was needin was how to do it thru vars =) tyvm =)
|
In response to Aridale
|
|
Aridale wrote:
see I think you said it by accident but usr.vars was exactly what I was lookin for. I knew you were looking for it, which was why I happened to include it. =) Just thought it would be a better idea to explain how it works rather than give you a straight out example. In any case, glad I could help! |
In response to Crispy
|
|
Any help is always muchly thanked =) Thanks to you helpin me out on that I just finished the training npc class for my game puttin the finishing touches on it now =)
|