Co Problem

  • 8 Replies
  • 2946 Views
*

Offline Vinterrun

  • 253
  • 0
  • Schniggedi Schnapp die Daumen sind ab!
    • View Profile
Co Problem
« on: January 13, 2011, 05:03:40 »
Heja together, I've the following problem. I try to create a CO with 4 parts (it's a Knytt with a wiggling tail and head). Anyways. Everything works fine but the CO is just loading 3 of the 4 parts of my CO. The last sprite is missing, but it's included in my spritesheed.

Help please. Here's the CO and the code:



Code:

[Custom Object 1]
Image=Da_Hood.png
Tile Height=75
Tile Width=22
Init AnimTo=2
Init AnimSpeed=35
under re-construction:

Coming late:


Starwale *pun*

*

Offline SiamJai

  • 706
  • 31
    • View Profile
    • A gaming blog like no other.
Re: Co Problem
« Reply #1 on: January 13, 2011, 06:37:19 »
The code "AnimTo=2" makes the renderer count only the first three sprites (it starts counting from 0). Try changing it to "AnimTo=3" and see if it works. :)

(In case you need a refresher on how each command works, the CO manual might be worth another look. ;) )
« Last Edit: January 13, 2011, 06:40:43 by SiamJai »

*

Offline Vinterrun

  • 253
  • 0
  • Schniggedi Schnapp die Daumen sind ab!
    • View Profile
Re: Co Problem
« Reply #2 on: January 13, 2011, 07:17:14 »
Nope doesn't change anything =( Maybe my ping is wrong?
under re-construction:

Coming late:


Starwale *pun*

*

Offline SiamJai

  • 706
  • 31
    • View Profile
    • A gaming blog like no other.
Re: Co Problem
« Reply #3 on: January 13, 2011, 07:24:39 »
That's strange... I'm going to check it out right now and update this if I find something.

*

Offline Vinterrun

  • 253
  • 0
  • Schniggedi Schnapp die Daumen sind ab!
    • View Profile
Re: Co Problem
« Reply #4 on: January 13, 2011, 07:36:20 »
Thank you a lot =D
under re-construction:

Coming late:


Starwale *pun*

*

Offline SiamJai

  • 706
  • 31
    • View Profile
    • A gaming blog like no other.
Re: Co Problem
« Reply #5 on: January 13, 2011, 08:03:59 »
No problem. :)

I found some issues both with the parameters and with the spritesheet, so I've just done a new one, this seems to be working:

[Custom Object 1]
Image=Da_Hood.png
Tile Height=20
Tile Width=18
Init AnimTo=3
Init AnimSpeed=135
Offset Y=2

Give it a go with the attached new spritesheet and see whether it works, and more importantly, whether this is the movement you had in mind. :)

(The Y offset and higher speed are optional.)
« Last Edit: January 13, 2011, 08:10:17 by SiamJai »

*

Offline Vinterrun

  • 253
  • 0
  • Schniggedi Schnapp die Daumen sind ab!
    • View Profile
Re: Co Problem
« Reply #6 on: January 13, 2011, 12:30:30 »
This is perfect! Thank you so much =D

But what exactly did I do wrong?
under re-construction:

Coming late:


Starwale *pun*

*

Offline SiamJai

  • 706
  • 31
    • View Profile
    • A gaming blog like no other.
Re: Co Problem
« Reply #7 on: January 14, 2011, 06:59:52 »
No problem - I'm glad it works! :)

The code had three problems: AnimTo was 2 instead of 3, and the Tile Height value was way too much for the spritesheet (I'm sure it wasn't 75px high, perhaps you mixed up height and width... I do that sometimes too). The width was also a bit more than 1/4th of the spritesheet width.

The spritesheet was not aligned well and there was too much space between each sprite. I've cut the sprites up in Fireworks, aligned them on top of each other, tested the animation and then made a new sheet by stacking the frames left-to-right with no space in between.
« Last Edit: January 14, 2011, 07:04:06 by SiamJai »

*

Offline Vinterrun

  • 253
  • 0
  • Schniggedi Schnapp die Daumen sind ab!
    • View Profile
Re: Co Problem
« Reply #8 on: January 14, 2011, 09:14:02 »
Got it! My new CO's are doing fine. Thanks to you ;)
under re-construction:

Coming late:


Starwale *pun*