ID:164880
 
Hello, i'm quiet new to coding but know some things. I just needed to know if it was possible to change the direction of the way the multile is facing due to the direction the main mob is facing using this code as a base
obj
puppet_3
icon='puppet.dmi'
icon_state="0,1"
density=1
pixel_x=32
mob
puppet3
icon='puppet2.dmi'
icon_state="0,0"
density=1
pupowner3 = ""
layer=FLY_LAYER
New()
..()
overlays+=/obj/puppet_3
..()


Help would really really be aprechiated.
can u help me i need to knw how to creat a game
Im guessing you're tryin to make a Naruto Game
Yeah, But not trying it's preety much all finalized i just wanted a multitile puppet to fit with my code.
In response to CUPID101MIAMI
Cmon people, Really need help with this.. and so far the replys have been of no relivence to my question.
Keiron wrote:
I just needed to know if it was possible to change the direction of the way the multile is facing due to the direction the main mob is facing using this code as a base

That is the default behavior of overlays: when you move the direction of the base object, it will change it's overlays to the same direction whenever possible. (This may not work when the direction is explicitly set.)

Your usage of objects to make overlays appear is odd too. You shouldn't use that method, as it creates an unnecessary temporary object.

overlays+=image(icon='puppet.dmi',icon_state="0,1",pixel_x=32)


Tada! An overlay added without using objects!

I don't know about overlays+=type but it might work. If that is the case, directional states should already be working. If it's not, then perhaps you should check if the "0,1" icon_state of puppet.dmi actually HAS multiple directions.
In response to Android Data
Android Data wrote:
Your usage of objects to make overlays appear is odd too. You shouldn't use that method, as it creates an unnecessary temporary object.

You can never know, it might as well just create something more stripped like basically an icon only with the settings from the atom definition.

overlays+=image(icon='puppet.dmi',icon_state="0,1",pixel_x=32)

Tada! An overlay added without using objects!

<small>Actually, that is sure to create a temporary /image object...</small>

I don't know about overlays+=type but it might work.

It does. Should work fine with directions 'n all too..