ID:265091
 
a way to make an overlay go onto them without having to click the spots where the icon is supposed to change? read id:55905 to know more about the problem. What should I do? I want to make the object's icon big, but don't want to deal with multi tiles. Any suggestions?

Thanks in advance,

AIR _KING--who really needs these questions answered too! newbie.10288

P.S. Need this answered too! newbie.10085

P.S. Oh and this too! code.8768

P.S. Oh Yeah! This too! newbie.10075

P.S. Don't you hate unanswered questions? I do!!!!!!!!!!!!!!
Well, at least you didn't bump those posts... but it takes time to answer them, and I've been taking a long vacation from answering questions in newbie central, due to both time constraints with regards to BYOND, and time restraints with regards to real life.

To change each part of a bitmap is rather difficult. What you need to do is determine the size of the bitmap beforehand, then make a list of all of the turfs that it spans (using the block() proc). Then you set the icon of all of the turfs in that block to the new icon you want.
In response to Spuzzum
I have:

obj
Click_Here
var/obj/Click_Here/C
icon='Click.bmp'
Click(C)
block(locate(2,9,1),locate(11,6,1))
overlays+='Clicked.bmp'

Need some help!!!
In response to Air _King
Air _King wrote:
I have:

obj
Click_Here
var/obj/Click_Here/C
icon='Click.bmp'
Click(C)
block(locate(2,9,1),locate(11,6,1))
overlays+='Clicked.bmp'

Need some help!!!

The block() gives you a list, as I said. By itself it does absolutely nothing. Once you have a list you loop through it and do your thing to every turf in it.
In response to Spuzzum
Ok I have this:

obj
Click_Here
var/obj/Click_Here/C
icon='Click.bmp'
Click(C)
for(C in block(locate(2,9,1),locate(11,6,1)))
C:overlays+='Clicked.bmp'


It kinda works, but it makes th .bmp smaller and puts it on every tile of the object-not really what it wanted.
In response to Air _King
Air _King wrote:
Ok I have this:

obj
Click_Here
var/obj/Click_Here/C
icon='Click.bmp'
Click(C)
for(C in block(locate(2,9,1),locate(11,6,1)))
C:overlays+='Clicked.bmp'


It kinda works, but it makes th .bmp smaller and puts it on every tile of the object-not really what it wanted.

I'm not sure I endorse the overall approach, but since you are close to getting what you want...

I don't think the auto-tiling of icons works for overlays. Why not try changing the last line to:

C.icon = 'Clicked.bmp'

The new tiles should take on the same icon_state as was already assigned, so the same parts should display.
In response to Skysaw
I don't think the auto-tiling of icons works for overlays. Why not try changing the last line to:

C.icon = 'Clicked.bmp'

The new tiles should take on the same icon_state as was already assigned, so the same parts should display.
You should also be able to set their icon_states. When bmps are used in byond, they are split up into icon_states from the lower left hand corner like a grid. so the first was is either "0,0" or "1,1", I can't remember. But anway, that way he could do it with overlays by using the the new icon() proc.
In response to Ebonshadow
It's zero-based with bitmaps.

Kind of inconsistent with the rest of the language, though...
In response to Skysaw
Start Screen.dm:11:error:C.icon:bad var

Thats why i used : and if i do C:icon it doesn't work either.

Help Please!!!
In response to Air _King
Air _King wrote:
It kinda works, but it makes th .bmp smaller and puts it on every tile of the object-not really what it wanted.

The Beta release notes contain the code you need for placing a multi-tile bitmap in code.
In response to Deadron
Ive tried all day long to get the icon_states proc to work for me, but it wont. Will someone give me a hint?