ID:150291
 
Ok. for example dragon warrior online. it goes like this
---------------------|
Screen |[Text][Browser][INFO!!!][Pager][Hub]
with |
pretty |
pictures |
---------------------|

And in other games that info box is not there!!! how is this done? how do you code this?

Ok now, i am wondering how you do that so if someone could please explain to me this code, i will be really greatfull.

Also, i would like to know how you put pictures inside the tab i called 'Stats' (obviously for status) and i am wondering how do i change the words HP into a picture. If your wondering my stat panel code goes like this:

mob
Stat()
statpanel("Stats")
stat("HP: [HP]/[MAXHP]")
stat("SP: [SP]/[MAXSP]")
stat("Atk: [attack]")
stat("Def: [defense]")
stat("Evd: [evade]")
stat("Lvl: [level]")
stat("Exp: [exp]/[expreq]")
stat("Coins: [wealth]")
return ..()
Selderan wrote:
And in other games that info box is not there!!! how is this done? how do you code this?

The info button only shows up if there isn't enough room to display the statpanels along with everything else. Then you can click that button to show the statpanels instead of something else (like the browser window or the text output window). Try resizing your window to be small and you'll see it come up automatically. There is no code to do this - it simply depends on how the DreamSeeker window is displayed on the client, which may be slightly different for each person.

Also, i would like to know how you put pictures inside the tab i called 'Stats' (obviously for status) and i am wondering how do i change the words HP into a picture. If your wondering my stat panel code goes like this:

The only way to get an icon in a statpanel is to stat an atom (area, turf, object or mob) that has an icon. The text next to the icon is that atom's name. So if you wanted to do that with HP, you would need to add a mob var that is an object called something like HPstat. Set its icon to whatever you wanted. Then in mob/Stat() you would want to set HPstat's name to the actual stat you want. Something like this:
mob
Stat()
statpanel("Stats")
src.HPstat.name = "[HP]/[MAXHP]"
stat(src.HPstat)
...

and so on.
In response to Air Mapster
alright my code goes like this
mob
Stat()
statpanel("Stats")
src.HPstat.name = "[HP]/[MAXHP]"
stat(src.HPstat)
stat("SP: [SP]/[MAXSP]")
stat("Atk: [attack]")
stat("Def: [defense]")
stat("Evd: [evade]")
stat("Lvl: [level]")
stat("Exp: [exp]/[expreq]")
stat("Coins: [wealth]")
return ..()

and i get an error like this
loading Tales of Chaos.dme
Statpanel.dm:7:error:src.HPstat.name:bad var
Statpanel.dm:8:error:src.HPstat:bad var

explain?

Tales of Chaos.dmb - 2 errors, 0 warnings (double-click on an error to jump to it)
In response to Selderan
Selderan wrote:
Statpanel.dm:7:error:src.HPstat.name:bad var
Statpanel.dm:8:error:src.HPstat:bad var

explain?

As I said, you need to add HPstat as a mob variable that is an obj.
mob
var/obj/HPstat
In response to Air Mapster
mob
var
obj
HPstat
icon = 'chip2.dmi'
icon_state = "hp"

with that i keep getting:

loading Code.dme
Code.dm:39:error:icon :duplicate definition
Code.dm:40:error:icon_state :duplicate definition
Code.dm:44:error:icon:undefined type: icon
Code.dm:45:error:icon_state:undefined type: icon_state
terrain.dm:127:error:usr.icon:undefined type: usr.icon
terrain.dm:128:error:usr.icon_state:undefined type: usr.icon_state
terrain.dm:133:error:usr.icon:undefined type: usr.icon
Monster.dm:43:error:icon:undefined type: icon
NPC.dm:110:error:icon:undefined type: icon
NPC.dm:111:error:icon_state:undefined type: icon_state
NPC.dm:7:error:icon:undefined type: icon
NPC.dm:8:error:icon_state:undefined type: icon_state
NPC.dm:35:error:icon:undefined type: icon
NPC.dm:36:error:icon_state:undefined type: icon_state
NPC.dm:84:error:icon:undefined type: icon
NPC.dm:92:error:icon:undefined type: icon
NPC.dm:93:error:icon_state:undefined type: icon_state
NPC.dm:101:error:icon:undefined type: icon
NPC.dm:102:error:icon_state:undefined type: icon_state
Code.dm:31:error:src.HPstat.name:bad var
Code.dm:32:error:src.HPstat:bad var

Code.dmb - 21 errors, 0 warnings (double-click on an error to jump to it)

-Edward Wong Hau Pepelu Tivrusky 1st
In response to Pillsverry
ok uhhh just a sec here
this is selds cuz baal, and im still on his comp, and it seems that when i did what you said, it still wouldnt work plus characters wouldnt save and load anymore, but when i ditched it, it was all better. Now you either did a few typos or you suck at coding.
In response to Pillsverry
Pillsverry wrote:
mob
var
obj
HPstat
icon = 'chip2.dmi'
icon_state = "hp"

You can't set an obj variable's properties when you declare it. You can set the whole obj to something when declared, but not individual properties. So you have 2 choices. Either create a new type of obj with those properties already set, or set them in mob/New().

Method 1:
obj
HPobj
icon = 'chip2.dmi'
icon_state = "hp"

mob
var/obj/HPobj/HPstat

Method 2:
mob
var/obj/HPstat

New()
src.HPstat.icon = 'chip2.dmi'
src.HPstat.icon_state = "hp"
. = ..()