I got the above done by making 10 grids (card size) and then adding my mobs objects to them, my mob has the following var...
obj/cards/Monster1
obj/cards/Monster2
obj/cards/Monster3
obj/cards/Monster4
obj/cards/Monster5
obj/cards/ST1
obj/cards/ST2
... etc
Whats going to happen eventually is that my opponents cards will be in those slots, not my own mobs. But this is the best way to test it out without me needing another player.
Unfortunatly, in my recent updates the cards (objects) will now be facing in various directions, but i want them to be either as above, or sideways (Defense Position). When simply adding the usrs obj/cards/Monster1 to the grid, it follows whatever icon that card has (which is good for some things) but not when my opponents card objects can now face various directions (see http://www.youtube.com/watch?v=KAvv7PHqhvQ).
if(usr.Monster3)
var/obj/cards/O = new Monster3.type
if(Monster3.FaceDown)
O.icon = 'card_back.dmi'
O.icon_state = pick("1","2","3","4")
O.icon = turn(O.icon,90)
else
var/icon/i = icon(initial(Monster3.icon),initial(Monster3.icon_state))
if(Monster3.Mode == "Defense") i.Turn(90)
O.icon = i
usr << output(O, "dwheel.m3")
else usr << output(null, "dwheel.m3")
The above code works. New problem now, it seems that once the object is added its being deleted? I want a click on the object in the grid to be treated like a click on the card itself (so my players can click the cards and see the card description). Currently clicking it does nothing, i tried to add some code to link it ~ but it didnt work at all.
When i tried to look at the objects variables to see if it was being set properly i got a runtime saying the object didnt exist, so its being deleted? but why? I assume its the garbage collector?
Alternatively, you could be assigning an improper value to the variable.