ID:174051
Oct 7 2003, 11:15 am
|
|
I would like to have an icon, a short string, then a variable in each line in a stat panel, I thought of using objs, but I don't know how to apply the obj as the name (I tryed using stat())
|
In response to Aridale
|
|
I tryed your code, but the result is "/icon FranquiBoy FranquiBoy:FranquiBoy" (I have no desc so I tested with .name)
|
In response to FranquiBoy
|
|
oh you want the players icon? You need to do a for loop then and output the result each cycle to the stat panel.
oh yeah I forgot if you have any click procs for whatever mobs the players are then you'll have to take those into account within the statpanel. like if clicking on a player displays theyre hps to you for example then in the user panel youd be able to click on em and get theyre hp regardless of where they are in the world. |
In response to Aridale
|
|
I have 9 skills rated from 0 (basic) to 5 (super expert), and an Icon that represent each. The stat panel is Skills and has the 9 icons face to face with there respecive skill
|
In response to FranquiBoy
|
|
well in that case make em turfs cause you'll never interact with em in the world since theyre just icons. Then make theyre icon and icon_state the icons for the skills. Then the \icon command should work. I use it with my description in my game and it works just fine. I use it for items and all kinda stuff.
|
In response to Aridale
|
|
stat("/icon [src] [src]: [src.description]") does! not! work!
You probebly have a library |
In response to FranquiBoy
|
|
nope no library. umm hmm lemme bust out some code and show ya I got maker runnin atm... one sec
hmmm ok... Heres what I came up with... I ran some tests with stuff in my game. Apparently it'll only show objects cause I couldnt get \icon to work either. BUT I did use stat(src.CurrentWeapon) and it showed my sword I had in my hand just like it did in my inventory. SO!!1 What Im thinkin is make your icons objs and then assign em to your mob. Then you can display em. Just make theyre name =null so it doesnt show a name next to em. Try that. I know Ive seen images in stat panels and Ive done it mahself before damnit I just cant get it to do it right now! But it did work with objs so try that. |
In response to Aridale
|
|
Ah ha! I'll just assign each icon obj to a variable. By the way, I want a name, the name of the skill because the icons arent all that clear.
Thank you very much, as much for your help as your patience |
In response to FranquiBoy
|
|
yeah I know what ya mean the 32x32 limitations on the icons is really a pain in the ass sometimes. Like I have fully visible armor on my guys and theyre around 28x28 so theyre bracers and gloves are basically like 1x2 and 2x2 its just enough to change the color from skin tone to an armor color no detail at all.
But np at all hopefully you'll get it all workin I know theres nothin worse than workin on somethin for hours on end and still bein no farther along than when you started =) |
In response to Aridale
|
|
I found my probleme, in stat, you cant have an atom AND a value, heh
------------ EDIT This is what I did (and it works) obj/Skills icon='Skills.dmi' var/obj/Skills/Skill1=new() Skill1.name="Skill1: [src.skilllvl1]" Skill1.icon_state="Skill1" Stat(Skill1) del(Skill1) Repeat for each skill |
In response to FranquiBoy
|
|
"/icon [src]"
That's a slash, you want a backslash. "\icon[src]" Remember all text macros start with a \ backslash. |
In response to Yota
|
|
It doesnt work either way in a statpanel.
stat("\icon[/turf/Icon/goldBuyIcon]") ingame stat("/icon[/turf/Icon/goldBuyIcon]") ingame /icon/turf/goldBuyIcon |
In response to Aridale
|
|
Aridale wrote:
It doesnt work either way in a statpanel. Yes it does. It just doesn't work with type paths. You have to use an actual object, NOT a type path. |
In response to Crispy
|
|
yeah I figured that out earlier when I was doin the tests. So basically /icon obj works but not /icon /obj/blah blah blah /shrug oh well long as it works I guess =)
|
In response to Aridale
|
|
Yup. Note that this...
<code>src << "\icon['myicon.dmi']"</code> ...will also work, as will this: <code>src << "\icon[icon('myicon.dmi',"my icon state")]"</code> In other words, you can use icon files and icon objects as well as atoms (mob/obj/turf/area). |
In response to Crispy
|
|
gonna have to remember that thats damn handy ty Crispy =)
|
the first part tells it to use the icon of src then then next src puts the name of src then the var called description.