I'm trying to make an actor with multiple limbs. Each one is an
indexed BMP, 58x125 pixels (I eventually want to crop each limb to the
correct size and position it separately, but not yet). Here's the
costume code:

<code>
palette([16-31]);

picture arm1St = {
   path = "frontarm-standing.bmp",
   position = { -30, -120 }
};

picture bodySt = {
   path = "body-standing.bmp",
   position = { -30, -120 }
};

picture leg1St = {
   path = "frontleg-standing.bmp",
   position = { -30, -120 }
};

picture headSt = {
   path = "head-standing.bmp",
   position = { -30, -120 }
};

picture headTk = {
   path = "head-talking.bmp",
   position = { -30, -120 }
};

picture leg2St = {
   path = "backleg-standing.bmp",
   position = { -30, -120 }
};

// in order, top to bottom:
limb arm1 = { arm1St };
limb body = { bodySt };
limb leg1 = { leg1St };
limb head = { headSt, headTk };
limb leg2 = { leg2St };
// arm2 would go here, behind the rest of the body

anim standW = {
   leg2(0),
   head(0),
   leg1(0),
   body(0),
   arm1(0)
};

anim talkStartW = {
   leg2(0),
   head(1),
   leg1(0),
   body(0),
   arm1(0)
};
</code>

And here's the code to initialize the actor:

       setCurrentActor(ted);
       initActor();
       setActorCostume(tedCost);
       setActorTalkPos(-60,-60);
       setActorName("Ted");
       setActorTalkColor(12);
       setActorAnimSpeed(2);
       actorObject[ted] = tedObj;
       setActorIgnoreBoxes();
       putActorAt(ted,350,90,Road);
       setActorDirection(WEST);
       setActorStanding();

But when I run the compiled game, Ted isn't visible at all - his
speech shows up in the right place, but he doesn't appear himself.

This is a simple drawing that only uses 6 colors, so I get warnings
from the costume compiler: "Warning, image frontarm-standing.bmp
doesn't have the same number of colors as the palette: 6 != 16." Do I
need to enlarge the palette?

Also, how does transparency work for actors? Does the room's
transparency color setting have anything to do with it--doesn't seem
likely since the actors have their own palettes--or is there some
other way the VM figures out which color is transparent?

Jesse

_______________________________________________
ScummC-general mailing list
[email protected]
https://mail.gna.org/listinfo/scummc-general

Reply via email to