Page 1 of 2

Animate *Color in Sprites op?

PostPosted: Sunday, 17.June 2012, 09:33
by Skinnytorus
Hi, All.
The anim editor does not recognize Color as a variable though it is supposed to animatable (Error: Line1: Unknown Symbol 'Color').
Has anyone tried that? Is this a bug or it's just me? Thank you.

Re: Animate *Color in Sprites op?

PostPosted: Sunday, 17.June 2012, 09:45
by ikam
which op ?

Re: Animate *Color in Sprites op?

PostPosted: Sunday, 17.June 2012, 09:53
by Skinnytorus
Yellow Sprites op.

Re: Animate *Color in Sprites op?

PostPosted: Sunday, 17.June 2012, 10:21
by ikam
it looks like a problem between the color type and the name (type color exist in script)

Re: Animate *Color in Sprites op?

PostPosted: Sunday, 17.June 2012, 10:28
by Skinnytorus
Yes. That's the problem. Anything can be done about it?

Re: Animate *Color in Sprites op?

PostPosted: Sunday, 17.June 2012, 11:33
by reEto
no problems in there, define splines to animate :)

Re: Animate *Color in Sprites op?

PostPosted: Sunday, 17.June 2012, 11:37
by Skinnytorus
thanks for the hint, but how do I bind a spline to the variable (*Color) that can't be recognized as such?

Re: Animate *Color in Sprites op?

PostPosted: Sunday, 17.June 2012, 13:16
by ikam
I think there is really a bug with sprites color, with conflit name/type. I've renamed Color param to Colora for testing
And script now working. However it's not very intuitive to anim color with spline :p

Re: Animate *Color in Sprites op?

PostPosted: Sunday, 17.June 2012, 13:49
by Skinnytorus
ikam
Great! Well done. It works! Several off-top remarks though:
1. Do you think this change will not conflict with older wz4 files?
2. Will you post a pull request for this change?
3. What is [0..3]? Some sort of interval for the spline (or its point count?) I guess... If I set it to smth 0..2 or 0..4 it doesn't work...
4. No big deal, but Calora seems a bit less obvious than Colors. Can you call this variable just "Colors"?

Re: Animate *Color in Sprites op?

PostPosted: Sunday, 17.June 2012, 14:10
by Skinnytorus
I noticed that Color type conflicts in any op that uses Color as a variable.
Same goes for animated tetures. Take a look at the example. Maybe the type itself should be renamed?

Re: Animate *Color in Sprites op?

PostPosted: Sunday, 17.June 2012, 14:15
by Skinnytorus
But what about compatibility then?... :roll:

Re: Animate *Color in Sprites op? [Solved]

PostPosted: Sunday, 17.June 2012, 14:35
by Skinnytorus
OK, guys! I have found the answer!!! \:D/
Use 'color_' variable to animate colors!
Many thanks for your help!!! Closing the issue.

Re: Animate *Color in Sprites op? [Solved]

PostPosted: Sunday, 17.June 2012, 15:03
by ikam
could you share an example please ;)
thks

Re: Animate *Color in Sprites op? [Solved]

PostPosted: Sunday, 17.June 2012, 15:13
by Skinnytorus
With pleasure.
here: viewtopic.php?f=43&t=1069

Re: Animate *Color in Sprites op? [Solved]

PostPosted: Sunday, 17.June 2012, 18:44
by ikam
from where come this variable ?
If I comment it, it doesn't change anything...