ID:1881458
 
(See the best response by Ter13.)
Problem description:

Ok so this is my first forum post so sorry in advance for the noob-ish question. Is there any way to change the size of an icon without changing the default size? Like, I want to keep icon_size as 32x32, however i want to make a boss character that is bigger than a regular 32x32 icon. Is there any way to make an object that takes up, say, two icon spaces? Or just make an icon that is bigger than that without changing the icon sizes of everything else on the map? Thanks.


Best response
You'll want to change the bounds.

mob
boss
bound_width = 64
bound_height = 64


Just make sure you use even multiples of the tile size or you will kick the world into pixel movement mode.
If you mean the icon file, they can only contain icon states of the same size, so you'll need to make a new icon file for your boss icon.

If you just want to scale up the existing icon, you can scale up the transform of the boss object.
How do I scale up the existing icon?

Also @Ter13, right now I have the boss icon stored as an obj, and when I said:

obj
boss
bound_width = 64
bound_height = 64

nothing happened. What did I do wrong?

(P.S. How the heck do I add tabs to forum posts??)
You need to put your code inside of dm tags:

<DM>
code goes here
</DM>

What map format are you running? Are you running TILED_ICON_MAP?

As for doubling the size of an icon:

obj
boss
bound_width = 64
bound_height = 64
transform = matrix(2,0,16,0,2,16) //read more about matrices in the references.
In response to Icepaka89
Boss should be a type of mob not obj.

mob/Boss
icon = 'Boss.dmi'
icon_state = "Boss"
bound_width = 64
bound_height = 64


Where boss.dmi contains one icon_state for the boss named Boss.
In response to Ter13
What are the map formats? I looked it up but couldn't find much...I have no idea what format I am using 0.0
In response to Icepaka89
Reference: map_format

If map_format isn't set anywhere in your project, then it defaults to TOPDOWN_MAP.
In response to LordAndrew
Thanks, I figured out the map problem. I have one more question though. Is there any way to make it so that way only the part of the icon that actually has a graphic drawn on it is dense. Because for platform icons I used a regular 32x32 icon, but only the top half has pixels (the bottom half is empty, if the whole block is drawn in it looks weird). However, from below, you can't jump all the way up to the bottom of the platform.
You could set pixel_y to -32 xor bound_y to 32.
In response to Kaiochao
What does that do exactly? I'm not familiar with using pixels / bounds.
Did you look it up in the DM Reference? F1 in the code editor.
In response to Kaiochao
Wow...I had no idea about the F1 thing, I feel dumb now. I managed to fix a whole bunch of problems with the icons on the map because of that. Thanks alot!
In response to Icepaka89
Icepaka89 wrote:
Wow...I had no idea about the F1 thing, I feel dumb now. I managed to fix a whole bunch of problems with the icons on the map because of that. Thanks alot!

Everyone does it, they don't make it obvious.