ID:144367
 
Code:
screen_loc = "1,0, 1:16,1:5"


How does this work? i read the help thing and it said for pixel offsets it uses the colon rather than pixel_x/y but im not sure how to put it in my code... any help? thanks

screen_loc="1:16, 1:16"

That puts something at x 1, y 1, pixel_x 16, pixel_y 16

screen_loc="4:35, 2:12"

That's x 4, y 2, pixel_x 35, pixel_y 12
In response to Jp
cheers mate! :D

i also have one small problem i cant seem to find

mob
proc
dragonballs()
if(DB1 && DB2 && DB3 && DB4 && DB5 && DB6 && DB7)
src.verbs += /mob/All/verb/Summon_Shenron
src.client.screen += new/obj/HudBlue/db1g
src.client.screen += new/obj/HudBlue/db2g
src.client.screen += new/obj/HudBlue/db3g
src.client.screen += new/obj/HudBlue/db4g
src.client.screen += new/obj/HudBlue/db5g
src.client.screen += new/obj/HudBlue/db6g
src.client.screen += new/obj/HudBlue/db7g
src.client.screen -= new/obj/HudBlue/db1
src.client.screen -= new/obj/HudBlue/db2
src.client.screen -= new/obj/HudBlue/db3
src.client.screen -= new/obj/HudBlue/db4
src.client.screen -= new/obj/HudBlue/db5
src.client.screen -= new/obj/HudBlue/db6
src.client.screen -= new/obj/HudBlue/db7
return
else
src.verbs -= /mob/All/verb/Summon_Shenron
src.client.screen -= new/obj/HudBlue/db1g
src.client.screen -= new/obj/HudBlue/db2g
src.client.screen -= new/obj/HudBlue/db3g
src.client.screen -= new/obj/HudBlue/db4g
src.client.screen -= new/obj/HudBlue/db5g
src.client.screen -= new/obj/HudBlue/db6g
src.client.screen -= new/obj/HudBlue/db7g
if(DB1)
src.client.screen += new/obj/HudBlue/db1
if(DB2)
src.client.screen += new/obj/HudBlue/db2
if(DB3)
src.client.screen += new/obj/HudBlue/db3
if(DB4)
src.client.screen += new/obj/HudBlue/db4
if(DB5)
src.client.screen += new/obj/HudBlue/db5
if(DB6)
src.client.screen += new/obj/HudBlue/db6
if(DB7)
src.client.screen += new/obj/HudBlue/db7


mob
All
verb
Summon_Shenron()
set category = "Interaction"
var/S[0]
S+="PowerLevel"
S+="Ki"
S+="Wealth"
S+="Temporary Speed"
switch(input("What is your wish") as null|anything in S)
if("PowerLevel")
usr.MaxHealth += 10000
DB1 = 0
DB2 = 0
DB3 = 0
DB4 = 0
DB5 = 0
DB6 = 0
DB7 = 0
dragonballs()
return
if("Ki")
usr.MaxKi += 10000
DB1 = 0
DB2 = 0
DB3 = 0
DB4 = 0
DB5 = 0
DB6 = 0
DB7 = 0
dragonballs()
return
if("Wealth")
usr.Zenni += 5000
DB1 = 0
DB2 = 0
DB3 = 0
DB4 = 0
DB5 = 0
DB6 = 0
DB7 = 0
dragonballs()
return
if("Temporary Speed")
Speedlvl += 5
DB1 = 0
DB2 = 0
DB3 = 0
DB4 = 0
DB5 = 0
DB6 = 0
DB7 = 0
dragonballs()
return


the icons appear on the hud when i collect the dbs, and they change to the other 7 icons when i have all 7. however when i use the summon_shenron verb they dont disappear... i may have mised something small but i cant seem to find it... thanks
In response to Ultimate165
You're subtracting a 'new' object, rather then the one that's currently there.

client.screen -= locate(/obj/HudBlue/db1) in client.screen

may work, but I can't remember if client.screen works like a regular list, and I have a suspicion that it may not.

If it doesn't work, you'll have to keep a reference to the HUD objects you're putting on their screen, and take them out that way.

Alternately, you could clear the entire HUD by setting client.screen to a blank list. That is:

client.screen=list()
In response to Jp
You could use a for loop for this, because I'm pretty sure it doesn't work like a regular list. Something to the effect of

for(var/obj/dragonball/D in src.client.screen)
del(D)


should work. Note that I didn't use the exact parent type because I forgot it when I was looking at this.

-Exophus
In response to Jp
Jp wrote:
I can't remember if client.screen works like a regular list, and I have a suspicion that it may not.

It does. The only strange ones I can think of are contents and overlays. At the very least, I know you can use locate() to search it (I do all the time).