Data Realms Fan Forums
http://45.55.195.193/

Draw After Parent sprite problem
http://45.55.195.193/viewtopic.php?f=1&t=20094
Page 1 of 1

Author:  TheSilentCrab [ Wed Nov 03, 2010 5:00 pm ]
Post subject:  Draw After Parent sprite problem

I've got a little problem with one of my actors. I'm still a newb in modding so "my" actor ended up being respritted dummy. After I finished this I thought I could make an addition to it, an armour. I've checked some of the actors, such as dreadnought to check how it works. First I made a helmet. Worked perfectly, as the helmet sprite was in front of the head sprite. However, the torso armour didn't work so well. Even thought I used DrawAfterParent to 1 nothing changed, legs and arms were in front of the armour which I tried to avoid. now the question is, is it possible for me to make the armour in front of arms and legs?

Author:  Lizardheim [ Wed Nov 03, 2010 5:09 pm ]
Post subject:  Re: Draw After Parent sprite problem

To make the armor infront of BG legs and arms, have the addatachable code under AHuman be defined AFTER the BG leg n arm
if you want it over everything, define it after all legs and arms n such.

Author:  TheSilentCrab [ Wed Nov 03, 2010 5:26 pm ]
Post subject:  Re: Draw After Parent sprite problem

Even thought it's at the very end of the AHuman it's still behind FG leg and FG arm.

Author:  Lizardheim [ Wed Nov 03, 2010 5:36 pm ]
Post subject:  Re: Draw After Parent sprite problem

Then it's probably hardcoded.
Why do you want torso armor to be infront of FG arms and legs anyways?

Author:  TheSilentCrab [ Wed Nov 03, 2010 5:39 pm ]
Post subject:  Re: Draw After Parent sprite problem

It looks strange this way. Maybe I should just make some arm and leg holes in the armour sprite and forget about this whole thing.

Author:  Lizardheim [ Wed Nov 03, 2010 5:40 pm ]
Post subject:  Re: Draw After Parent sprite problem

You can just have the arms and legs have armor on the sprites.

Author:  TheSilentCrab [ Wed Nov 03, 2010 6:12 pm ]
Post subject:  Re: Draw After Parent sprite problem

I'm so dumb I didn't even think about a possibility like that. Thanks a lot Lizard.

Author:  Lizardheim [ Wed Nov 03, 2010 6:44 pm ]
Post subject:  Re: Draw After Parent sprite problem

You're welcome :)

Author:  LowestFormOfWit [ Mon Nov 15, 2010 7:29 am ]
Post subject:  Re: Draw After Parent sprite problem

To reiterate for anyone else, there IS a hard-coded (read: tough sh*t) draw order for actors.

FIRST LAYER:
-BG Arms-Legs will always come first.
-Any BG Arm/Leg Attachables (Including feet, but not hands)
-Jetpack next.
SECOND LAYER:
-Torso, Head will come after that.
-Any Torso or Head attachables next.
THIRD LAYER:
-FG Arms/Legs.
-FG Foot.
-Any FG Arm/Leg Attachables are drawn over next.
-FG and BG Hands are drawn over just about everything.

I'm 80% sure I have an accurate draw order, or if not, I'm not far off.
The thing I am sure about, is that while you can use DrawAfterParent = 0 or 1 to move certain body parts in front of or behind other parts, you CAN NOT use it to move anything from one "layer" to another "layer".

For example, you CAN add an attachable helmet to the head that you can make appear in front of the head, or behind it. However, you CAN'T ever make that helmet be drawn after the FG Arm or Leg.

Someone correct me if I'm wrong, it's late and I'm not nearly as active in CC as I should be.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/