ID:493026
 
(See the best response by BrickSquadron.)
Problem description:
I don't have a code, but this post is more of a question? Can you change the size of a object using codes? Like, I know you can change the color of an object using src.icon+=rgb(0,0,0) stuff like that. Is there a way you can do something like src.size=40x40? Or would I have to re-icon the whole thing over again?
Best response
You can get the object's icon and use icon.Scale() to change the size of said icon if you wish. To change the actual bounding box size and location there is also atom/movable.bound_x, atom/movable.bound_y, atom/movable.bound_width, and atom/movable.bound_height. These are all explained in the reference.

Note: Scaling icons will not look as good as if you had created a piece of unique pixel art to represent the larger icon.
In response to BrickSquadron
BrickSquadron wrote:
You can get the object's icon and use icon.Scale() to change the size of said icon if you wish.
- I tried that, and didn't really get it to work for the object icon? I can get it to work for the players icon, but I need it for an on-screen object.

atom/movable.bound_width, and atom/movable.bound_height.
- I thought those are just to identify the boundaries of the icon?

What I'm trying to do is, take a 32x32 icon, and stretch it into like a 64x64 icon without having to re-icon the whole thing.
icon.Scale() will work for objects and mobs. If it's not you're using it wrong.
In response to JunK Games
JunK Games wrote:
icon.Scale() will work for objects and mobs. If it's not your using it wrong.

How should I use it in this case? Make an example please. This is my code.

obj/HUD/NewGame
icon='Labels.dmi';icon_state="NewGame"
screen_loc="9,6:-3"
MouseEntered() {src.icon_state="NewGameSelect";var/sound/S = sound('BleepBloop.ogg');usr << S}
MouseExited() {src.icon_state="NewGame"}
Click() {var/sound/S = sound('Click.ogg');usr << S;usr.CanSave=1;usr.NewGame()}