ID:1867043
 
(See the best response by Lummox JR.)
How would I go about displaying an object along with its icon in a grid? I've looked at the resources already, although they aren't of any help.
Best response
It's as simple as this:

player << output(theobj, "[gridname]:[col],[row]")

Note that the object has to exist continuously for this to work right; you can't create a temporary obj and output it, because once it's deleted the cell will be emptied again.
In response to Lummox JR
It's as simple as that? Honestly, I thought it'd be a lot more difficult.

Appreciated, Lee!
Sadly, the
[gridname]
gives the "undefined var" error. I've resorted to writing the grid name without the parenthesis, although I'm not sure whether this is working or not (it doesn't appear to be).
In response to Kboy33
Lol.
M << output(src, "ReplaceThisWithGridName:InsertColumn,InsertRow")

Where "M" refers to the player and "src" as the object.

Edit: Alternatively, you could predefine the grid name in a #define or make a var for it that holds a string with the grid name. That way you can leave the brackets shown in Lummox Jr's post. Make sure to do the same for column and row.

Also, you need to actually, you know, have the grid visible for it to work. Don't forget to clear it as well, when needed.
In response to FishMan123
Hrm, excuse me for my slowness; I haven't programmed in a good six months or so!

I think my issue may also arise because I am using a self-made datum.

Jutsus
Perks
parent_type = /obj
Jutsus
icon_state="All"


mob
proc
DataRefresh()
for(var/Jutsus/Perks/Jutsus/O in Perks)
src << output(O, "perkgrid:[1],[1]")


Mind you, the issue is that it only displays one of the objects:



You're outputting everything to one specific cell.
In response to Super Saiyan X
Right, so how would I output them to multiple cells?
In response to Kboy33
Use different cell coordinates. You're only using 1,1. You want a different spot for each object, right? You have to specify the column and row of each object you send, otherwise they all go to the same cell and overwrite the previous object.
In response to Kaiochao
Mhm. I have well over 50 cell objects, however. Therefore how would I make it do this automatically rather than manually?

(clarification: not having to write the individual cells for each objects)
Jutsus
Perks
parent_type = /obj
Jutsus
icon_state="All"


mob
proc
DataRefresh()
var/row = 1
for(var/Jutsus/Perks/Jutsus/O in Perks)
src << output(O, "perkgrid:[1],[row]")
row++


Not sure if thats what you're asking for, but it should display eveything for you
In response to Gluscap
Perfect.

Thank you all.