Page 1 of 1

Adding loading states

Posted: 25 May 2009 19:33
by Samscam
Hey, I want to make a grf wich adds loading states to the goods wagon, but I can't seem so make it right.
Here is what I have, but it doesn't change anything in the game.. I hope you can help me out:

Code: Select all

// Automatically generated by GRFCODEC. Do not modify!
// (Info version 7)
// Format: spritenum pcxfile xpos ypos compression ysize xsize xrel yrel
    0 * 4	 0C 00 00 00
    1 * 30	 08 06 "VS" 13 04 "Sam's MasterMind Goods" 00 00
    2 * 4	 01 00 02 04
    3 sprites/mastermind.pcx 66 8 01 18 8 -3 -10
    4 sprites/mastermind.pcx 82 8 09 16 20 -14 -7
    5 sprites/mastermind.pcx 114 8 01 12 28 -14 -6
    6 sprites/mastermind.pcx 162 8 09 16 20 -4 -8
    7 sprites/mastermind.pcx 66 40 01 18 8 -3 -10
    8 sprites/mastermind.pcx 82 40 09 16 20 -14 -7
    9 sprites/mastermind.pcx 114 40 01 12 28 -14 -6
   10 sprites/mastermind.pcx 162 40 09 16 20 -4 -8
   11 * 13	 02 00 00 02 02 00 00 01 00 00 00 01 00
   12 * 10	 03 00 01 20 01 05 00 00 00 00
What it has to do: Change the sprite of the goods wagon so that it has 2 loading states: full or empty, also use these states when the train is moving.

What it currently does: Nothing :s

Thx in advance,
Sam

Re: Adding loading states

Posted: 25 May 2009 19:36
by DJ Nekkid
try adding a action 0, with property 12 set to FD, and you may have success :)

Re: Adding loading states

Posted: 25 May 2009 19:42
by Samscam
DJ Nekkid wrote:try adding a action 0, with property 12 set to FD, and you may have success :)
Thx, you think this will work:

Code: Select all

2 * 6 00 00 01 20 12 FD
I'm currently giving it a try, will edit when done.

Edit: The sprite is changed now, thx, but the loading states aren't working :s

Re: Adding loading states

Posted: 25 May 2009 19:58
by DJ Nekkid
i would do it like this:

Code: Select all

    2 * 4    01 00 02 04
// Empty
    3 sprites/mastermind.pcx 66 8 01 18 8 -3 -10
    4 sprites/mastermind.pcx 82 8 09 16 20 -14 -7
    5 sprites/mastermind.pcx 114 8 01 12 28 -14 -6
    6 sprites/mastermind.pcx 162 8 09 16 20 -4 -8
// Full
    7 sprites/mastermind.pcx 66 40 01 18 8 -3 -10
    8 sprites/mastermind.pcx 82 40 09 16 20 -14 -7
    9 sprites/mastermind.pcx 114 40 01 12 28 -14 -6
   10 sprites/mastermind.pcx 162 40 09 16 20 -4 -8
// two sets
   11 * 13    02 00 A0 02 02 \w0 \w1 \w0 \w1

// action 0 with "new sprites, + action 3
   13 * 6 00 00 01 20 12 FD
   12 * 7      03 00 01 20 00 A0 00

Re: Adding loading states

Posted: 25 May 2009 21:39
by Samscam
Thx, it's working now. I just took the wrong graphics for full and empty, so the wagon looked full when is was empty :lol:

Re: Adding loading states

Posted: 26 May 2009 05:58
by DJ Nekkid
good...

nice to see your first stumbling steps of .nfo turning into something... who knows, one day you might program something like the 2cc set :)