ID:179715
 
I have a list of skills wrote down on paper, but the problem is I dont know how to make the panel called "Techniques" show all my skills in a list.

I have tried too look for how to do this but I have had no luck yet, so could anyone please help me out?

Lee
Sorry to bump my post but could someone please help me out?

Lee
In response to Mellifluous
well you could do something like this:


mob/verb
Kung_Fu_Punch()
set category = "techs"
//code
Kung_Fu_Kick()
set category = "techs"
//code
Kung_Fu_Chop()
set category = "techs"
//code



etc etc


-Rcet
In response to Rcet
Rcet wrote:
well you could do something like this:


mob/verb
Kung_Fu_Punch()
set category = "techs"
//code
Kung_Fu_Kick()
set category = "techs"
//code
Kung_Fu_Chop()
set category = "techs"
//code



etc etc


-Rcet

I meant like this:

Blacksmithy = 0
Carpentry = 0
Wrestling = 0


etc...or would that work with the way I want it?

Lee
In response to Mellifluous
Mellifluous wrote:
Sorry to bump my post but could someone please help me out?
Stat()
...

statpanel("Techniques")
for(S in skills)
stat(S,skills[S])

This assumes skills is a list var for your mob, and that it contains string or object entries associated with values, like this: skills["Carpentry"]=50.

On a side note, this is the second post I've seen you apologetically bump in the last week; you may have bumped more, but as I've been both busy and sick I haven't been reading closely. Since you know it's obnoxious, I suggest you stop doing it, because this is the last time I'll offer you help on a post you bump.

Lummox JR
In response to Mellifluous
mob/var/Skills = list(3)
mob/archer/New()
Skills[1] = 0
Skills[2] = 9
Skills[3] = 2
mob/fighter/New()
Skills[1] = 9
Skills[2] = 3
Skills[3] = 0
mob/ninja/New()
Skills[1] = 2
Skills[2] = 6
Skills[3] = 4
mob/Stat()
statpanel("Skills")
stat("Swordmanship",Skills[1])
stat("Archery",Skills[2])
stat("Swimming",Skills[3])


Chew on that.
In response to Lord of Water
That would work, but its not very pretty. Using associated lists, you can do it much more convienently:

mob/var/Skills = list(3)
mob/var/PossibleSkills = list("Swordsmanship","Archery","Swimming")

mob/archer/New()
Skills["Swordsmanship"] = 0
Skills["Archery"] = 9
Skills["Swimming"] = 2
mob/fighter/New()
Skills["Swordsmanship"] = 9
Skills["Archery"] = 3
Skills["Swimming"] = 0
mob/ninja/New()
Skills["Swordsmanship"] = 2
Skills["Archery"] = 6
Skills["Swimming"] = 4
mob/Stat()
if(statpanel("Skills"))
var/S
for(S in PossibleSkills)
Stat(S, Skills[S])


This is easier to read, shorter, and allows for adding skills on the fly more easily.

-AbyssDragon
In response to AbyssDragon
AbyssDragon wrote:
That would work, but its not very pretty. Using associated lists, you can do it much more convienently:

mob/var/Skills = list(3)
> mob/var/PossibleSkills = list("Swordsmanship","Archery","Swimming")
>
> mob/archer/New()
> Skills["Swordsmanship"] = 0
> Skills["Archery"] = 9
> Skills["Swimming"] = 2
> mob/fighter/New()
> Skills["Swordsmanship"] = 9
> Skills["Archery"] = 3
> Skills["Swimming"] = 0
> mob/ninja/New()
> Skills["Swordsmanship"] = 2
> Skills["Archery"] = 6
> Skills["Swimming"] = 4
> mob/Stat()
> if(statpanel("Skills"))
> var/S
> for(S in PossibleSkills)
> Stat(S, Skills[S])
>
>
> This is easier to read, shorter, and allows for adding skills on the fly more easily.
>
> -AbyssDragon

Thank you.

Yes Lummox, I will stop bumping posts...very sorry for that.

Lee