ID:165890
 
could i get an example of how to use that?
where would i begin to set that up
uhh... what do you wana use it for...?
I believe you can set up pixel y or pixel x in any atom.Sorry, but I cant give you an example.
In response to Dragon_fire6653
you can, you can set it anywhere at any time! which is why i wana know what hes trying to do lol
In response to Falacy
i'd like to use it to make my icons bigger for my mobs and some of the monsters in the game
In response to Dsb520
ok, then you can just make objects before hand for each extension on the mob
obj/BL
pixel_x=-32

and then edit the icon and add it to overlays
mob/MultiMob
icon='human.dmi'
New()
var/obj/BL/BL=new()
BL.icon='human.dmi'
BL.icon_state="BL?"
src.overlays+=BL


that will make the mob double wide, however! the left side of the mob will not be dense
In response to Falacy
ah ok.
you couldnt make it so that all mob/X

types have that attribute?

im mostly interested in height as opposed to width

for instance something like


mob/x and possibly having to do with the world command to set the pixel size.
my other alternative is using multiple tiles but im not sure yet which i'd like to do.
I know i'm going to use multiple tiles for some of the "boss" monsters in my game.
In response to Dsb520
Dsb520 wrote:
you couldnt make it so that all mob/X
types have that attribute?

sure you could? youd just have to define some other variables to setup icons and such

im mostly interested in height as opposed to width

so then just change the pixel_x to pixel_y and it will do height...

and! i didnt understand your example idea thing o.O
In response to Falacy
lol sorry.
basically what i meant was there anyway to initialize all mobs of X type to have a y pixel of 32
for instance.
no code needed i was just curious if it could be done.


also i was wondering why did you make an OBJ and make the pixels wider?
could you interchange that for a mob
In response to Dsb520
Dsb520 wrote:
lol sorry.
basically what i meant was there anyway to initialize all mobs of X type to have a y pixel of 32
for instance.
no code needed i was just curious if it could be done.

with NO code at all? no, but with minimal code yes

also i was wondering why did you make an OBJ and make the pixels wider?
could you interchange that for a mob

you could if you wanted
In response to Falacy
ok thanks for the help much appreciated.

also by this
no code needed i was just curious if it could be done.


i just meant you didnt need to show me in code. words would be fine for an explanation
In response to Dsb520
oh, then yea
In response to Falacy
mob
monster

icon = 'monster.dmi'
icon_state = "bottom"

top
icon_state = "top"
pixel_y = 32

proc/addMonsterTop()
src.overlays += /mob/monster/top
New()
..()
addMonsterTop()


Although its good to know that you dont HAVE to create an atom to add an overlay, even if you'd like it to have pixel offsets. Using the image command you can set all of the overlays properties, eg;

mob/monster
icon = 'monster.dmi'
icon_state = "bottom"
New()
..()
addOverlays()
proc/addOverlays()
src.overlays += image(icon = 'monster.dmi', icon_state = "top", pixel_y = 32)


-Conj'
In response to The Conjuror
The Conjuror: for one, that snippet won't work because you never created the top of the monster. Second, I'd recommend using images for this. (I think it's possible.)

mob
monster
icon='monster.dmi'
icon_state="bottom"
proc/addMonsterTop()
var/image/I=image('monster.dmi',"top")
I.pixel_y=32
src.overlays+=I
New()
.=..()
addMonsterTop()


That way, you won't have to create a whole new object just for a single overlay.
In response to Android Data
The monster top is created in that code, what're talking about? And I had already suggested, directly below that snippet, a method for using image.
In response to The Conjuror
The Conjuror wrote:
The monster top is created in that code, what're talking about? And I had already suggested, directly below that snippet, a method for using image.

... Oh. :|
Nevertheless, your code wouldn't work because <code>image()</code> doesn't take <code>pixel_y</code> as an argument like that. Methinks. :\
In response to Android Data
Yes, it does.
In response to The Conjuror
The Conjuror wrote:
Yes, it does.

... Oh. :|

=(