standing animation cycling problem
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
standing animation cycling problem
This modified troll has a standing animation, which should be a flower circling around the troll continuously. But it doesn't do that, instead it:
1. Only cycles twice, then stops until you select the troll, when it cycles twice again.
2. It cycles before allowing the unit to move, causing an annoying delay
3. The animation fires during movement. It may be related to the select firing in #1, and may fire during other possible events as well.
Have I screwed something up (I'm not seeing it, but maybe) or is this a bug?
To see what I mean, replace your mainline Troll config file with the one attached.
1. Only cycles twice, then stops until you select the troll, when it cycles twice again.
2. It cycles before allowing the unit to move, causing an annoying delay
3. The animation fires during movement. It may be related to the select firing in #1, and may fire during other possible events as well.
Have I screwed something up (I'm not seeing it, but maybe) or is this a bug?
To see what I mean, replace your mainline Troll config file with the one attached.
- Attachments
-
- Troll.cfg
- (2.56 KiB) Downloaded 164 times
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
Re: standing animation cycling problem
it looks like you are trying to do this in a programmatic manner, have you considered brute-forcing it with image frames like in a flying unit for example, here is the gryphon:
or does this conflict with other plans/code?
Code: Select all
[standing_anim]
start_time=0
layer=60
[frame]
duration=150
image="units/monsters/gryphon-flying-1.png"
[/frame]
[frame]
duration=150
image="units/monsters/gryphon-flying-2.png"
[/frame]
[frame]
duration=150
image="units/monsters/gryphon-flying-3.png"
[/frame]
[frame]
duration=150
image="units/monsters/gryphon-flying-4.png"
[/frame]
[frame]
duration=150
image="units/monsters/gryphon-flying-5.png"
[/frame]
[frame]
duration=150
image="units/monsters/gryphon-flying-6.png"
[/frame]
[frame]
duration=150
image="units/monsters/gryphon-flying-7.png"
[/frame]
[frame]
duration=150
image="units/monsters/gryphon-flying-8.png"
[/frame]
[/standing_anim]
Re: standing animation cycling problem
Hi Crow_T,
Thanks for taking a look. It's true, if I really wanted to make a flying-flower troll, there are other ways to do it, but it was just a simple example to get to the core of the trouble. I'm hoping to get this working in the spirit of the method I used.
(BTW, I should have said I'm using BfW 1.11.7.)
Thanks for taking a look. It's true, if I really wanted to make a flying-flower troll, there are other ways to do it, but it was just a simple example to get to the core of the trouble. I'm hoping to get this working in the spirit of the method I used.
(BTW, I should have said I'm using BfW 1.11.7.)
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
Re: standing animation cycling problem
I'm no pro, but it seems like duration has no effect. I messed with this a bit, can't figure it out.
From my 3D animation experience you want to take the end frame out- for example in a 30 frame walk cycle you duplicate the first frame to the last one, but when cycling you only use 1-29. I wonder if there is a repeated frame here that is messing things up (I don't understand the code for that part.) Should durations be 0-500 one way then 501-1000 the other? I tried that but it didn't work, I may have missed something.
From my 3D animation experience you want to take the end frame out- for example in a 30 frame walk cycle you duplicate the first frame to the last one, but when cycling you only use 1-29. I wonder if there is a repeated frame here that is messing things up (I don't understand the code for that part.) Should durations be 0-500 one way then 501-1000 the other? I tried that but it didn't work, I may have missed something.
Re: standing animation cycling problem
Yeah, the timings would be a likely place for me to have made a mistake, but if I copy&paste all stuff from the flower to the main sprite frame, it works as I expected.
So, I don't think that's it. It does just look like xxx_frame stuff isn't working very well. I've filed a bug report: http://gna.org/bugs/index.php?21316
Code: Select all
[standing_anim]
start_time=0
cycles=true
offscreen=false
x=55~50:50,50~0:200,0~-50:200,-50~-55:50,-55~-50:50,-50~0:200,0~50:200,50~55:50
y=-45~-30:500,-30~-45:500
[frame]
image=units/trolls/grunt.png
duration=500
[/frame]
[frame]
image=units/trolls/grunt.png
duration=500
[/frame]
# flyball_start_time=0
# flyball_x=55~50:50,50~0:200,0~-50:200,-50~-55:50,-55~-50:50,-50~0:200,0~50:200,50~55:50
# flyball_y=-45~-30:500,-30~-45:500
# [flyball_frame]
# image=items/flower3.png
# layer=79
# duration=500
# auto_vflip=no
# [/flyball_frame]
# [flyball_frame]
# image=items/flower3.png
# layer=38
# duration=500
# auto_vflip=no
# [/flyball_frame]
[/standing_anim]
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
| Abandoned: Tales of the Setting Sun
GitHub link for these projects