Since I'm being ignored, I'll just move things along:
NPC Code:
if (created) {
showcharacter;
setcharani dk_tree,2;
}
NPC Code:
GANI0001
SPRITE 0 dk_treeshadow2.png 0 0 144 64 shadow
SPRITE 1 dk_tree_trunk.png 0 0 64 64 trunk
SPRITE 2 dk_sum2_tree.png 0 0 192 192 Summer Tree
SPRITE 3 dk_fall2_tree.png 0 0 192 192 Fall Tree
SPRITE 4 dk_spring_tree.png 0 0 192 192 Spring Tree
SPRITE 5 dk_fall_tree.png 0 0 192 192 No Leaves
SINGLEDIRECTION
DEFAULTPARAM1 2
DEFAULTHEAD head19.png
DEFAULTBODY body.png
ANI
1 -8 -8, PARAM1 -66 -130
ANIEND
Let me explain. If the object you are using fits well into a 48x48 (3x3) frame then use
showcharacter. This works great for a lot of things and automattically adjusts display priority for drawing over and under players/character NPCs. If its going to be
larger than 48x48, then in the gani, set a base image and a top image. The base should be the width of the image (obviously) and the vertical space is up to you. For my castle walls, the height is always 48 pixels high (3 tiles). For drawing the overlaying image, I use a script within the gani. A good place for examples of this, other than what I post, would be the GK ganis for buildings. I've also found that putting the image in the gani at 0,0 makes it fit better with the tiles rather than taking a 32x32 sprite and trying to center it in the 48x48 pane...unless you want it to be centered. Putting it at 0,0 is good for making sure things like npc object walls align properly
NPC Code:
GANI0001
SPRITE 0 SPRITES 0 0 24 16 shadow
SPRITE 1 dk_castle_wall_96.png 0 176 96 48 Castle Wall - 96 Base
SPRITE 2 dk_castle_wall_96.png 0 0 96 200 Castle Wall - 96 Top
SINGLEDIRECTION
DEFAULTHEAD head19.png
DEFAULTBODY body.png
SCRIPT
if (playerenters) {
showimg 1,2,playerx-0/16,playery-176/16;
changeimgvis 1,2;
}
SCRIPTEND
ANI
1 0 0
ANIEND