ID:174070
 
When I import an image into a DMI file, and it's bigger than 32x32, it asks me if I want to split it up. I click yes. The icon_states become 0,0 0,1 0,2 1,0 1,1 1,2 etc.
How can I use these to be auto arranged when I define the object or place it on the map?

<-Airjoe->
think of it as being on a grid.

0,0 is the origin.

1,0 is up 1 from 0,0 (i think that this is the right way)

0,1 is left 1 from 0,0

1,1 is up 1 and left 1 from 0,0

if you wanted a proc to make it auto place them into their respective spots you could go like this:

obj/new_thing_bigger_than_32X32
icon='icon.dmi'
icon_state="0,0"
orig
New()
src.orig=1
src.auto_arrange()

(not sure if object can have procs... I think they can)

obj/proc/auto_arrange()
if(src.orig==1)
var/obj/k=new/obj/new_thing_bigger_than_32X32(src.x,src.y,sr c.z)
k.icon_state="1,0"

and just figure out a way to make it self sufficient to auto change from that if that is what you are looking for. I hope this helps
In response to Satans Spawn
damn you can import larger files into dmis and it'll split em up for you?! And to think all this time Ive been usin Castles SplitImage to do it...

Id also really like to know how to lay em out as 1 image cause I wanna make some animated fog that moves over my screen for my game.
In response to Aridale
I know what you mean... I found this really cool, and big, dragon picture... I spent hours cutting it into 32x32 pieces and then copying them to Icon_states and trying to rebuild it after wards
In response to DarkCampainger
lol yeah all of the towns and castles in my game are at the very least 3 32x32s my main castle is 12 and I had to draw a lil diagram so I can build it lol. Stuffs like tryin to put together a puzzle but ALL the sides are exactly the SAME! /shakes head