ID:269507
 
card
var
icon_state
mob/owner
proc
display()
var/g=(owner.player==1)?1:10
var/image/i=image('cards.dmi',"back")
i.loc=locate(owner.hand.Find(src),g,1)
for(var/mob/m in world)
if(m!=owner){m.client.images+=i;continue}
i.icon_state="[m.ant]front"
var/icon/d=icon(i.icon,i.icon_state)
d.Blend(image('cards.dmi',icon_state),ICON_ADD)
i.icon=d
m.client.images+=i


I haven't tried it yet, since I can't. But I'm wondering if it'd work. It's supposed to show the card down to everybody that's not the owner, and the card up to everybody who's not.
I can't find a real mistake in that code but something is confusing me:
                i.icon_state="[m.ant]front"
var/icon/d=icon(i.icon,i.icon_state)
d.Blend(image('cards.dmi',icon_state),ICON_ADD)
i.icon=d
m.client.images+=i

First you change i.icon_state and then you change it indirectly again by changing d.icon_state. Why do you do this? And why "[m.ant]front"? Why not simply "[m.ant]"?
In response to CIB
Er, the icon_state for it is [m.ant]front, and I don't get what you mean by the other thing. :/
In response to Ol' Yeller
                if(m!=owner){m.client.images+=i;continue}
i.icon_state="[m.ant]front"//here you change the icon state
var/icon/d=icon(i.icon,i.icon_state)
d.Blend(image('cards.dmi',icon_state),ICON_ADD)//and here you change it to the icon state of the src unless having used the first change
i.icon=d
m.client.images+=i
In response to CIB
var/icon/d=icon(i.icon,i.icon_state)
d.Blend(image('cards.dmi',icon_state),ICON_ADD

I'm blending it, adding an overlay to it (the card's icon).
In response to Ol' Yeller
wat is it ment to do cause i was bored so i put it in and made a lil card thing but it came up with the following errors :

loading cards.dme
cards.dm:7:error:owner.player:undefined var
cards.dm:9:error:owner.hand.Find:undefined var
cards.dm:12:error:m.ant:undefined var

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

so i dont no

i hope by u seeing the errors u can work it out :/
In response to Ol' Yeller
Oh...
In response to E-ray
Read the errors... It's just undefined variables and that's normal for only a part of a code, isn't it? The variables are defined somewhere else I think.
In response to CIB
oh.....

yea

im new at this but u no i was just trying to help

did i ?


and just a quick Q how do u put images on ere like icons moving or still ?