Variable:sprite

From TTWiki
Jump to navigationJump to search

These are the inividual sprites for the object.

id = Number of the sprite
xofs = The X offset
yofs = The Y offset

chunked = If it is chunked
copy = Duplicates the previous sprite
hasdata = If it has an image
pngfile = The .png image file

The X and Y offsets are the offset from the vehicle centre to the top left corner of the sprite. For example, if the notional vehicle centre is at pixel (5,12) then you would put xofs="-5" and yofs="-12".

If you decompiled with locotool.exe parameter "-s" (puts all sprites in a single *.png instead of one *.png for each sprite) you can also set:
width = width of the sprite from the *.png (goes right from xofs)
height= height of the sprite from the *.png (goes down from yofs)
before recompiling. Not sure if this even requires -s you might just add those.