Right now I can set IsAnimated and frameCount properties in Tiled and let simple animations come to life with ease. I would suggest adding time to this mix. If I want to manage the timing of animations the only way to do that now is to write code. For all simple animations I’d like to be able to rely on Tiled properties. Is it possible to include time in there as well? Thanks [import]uid: 11904 topic_id: 4794 reply_id: 304794[/import]
As far as I can remember you will need to use the animation sequences for that as basic animations are frame based rather than time based. You can set a time on the sequenced animations. [import]uid: 5833 topic_id: 4794 reply_id: 15344[/import]
In the basic animation you tell how many frames to use from the start and they are shown one after the other as fast as the system can support I suppose.
In the advanced option there is the time=2000 etc additional control. Question is whether Lime could be improved to support that when its in the Tile Property. [import]uid: 11904 topic_id: 4794 reply_id: 15347[/import]
Done. Will be in the next version
You just create your tile with the usual “IsAnimated”, “frameCount” and “loopCount” (if you want it) and then you add an optional “frameTime” property in milliseconds.
What this does internally is actually create a single sequence called “DEFAULT” (may change this later) and then immediately play it. This means that you can still use all the usual pause, play stuff with it.
If you don’t specify a frameTime it will default to 1000, however what would people prefer, a default of 1000 or that it would just create a normal (old fashioned) frame based animation? [import]uid: 5833 topic_id: 4794 reply_id: 16142[/import]
This is great! It will make life so much simpler for me and allow for further delegation in larger productios. Thank you very much! [import]uid: 11904 topic_id: 4794 reply_id: 16185[/import]
[import]uid: 5833 topic_id: 4794 reply_id: 16187[/import]
Just tried this on my spinning coin. added frameTime and now getting the following error.
Runtime error
…E8GRAZa-jdKPqU+++TI/TemporaryItems/5/lime-lychee.lua:420: attempt to index global ‘self’ (a nil value)
stack traceback:
[C]: ?
…E8GRAZa-jdKPqU+++TI/TemporaryItems/5/lime-lychee.lua:420: in function ‘getTileIDsFromBase64’
…E8GRAZa-jdKPqU+++TI/TemporaryItems/5/lime-lychee.lua:499: in function ‘newLayer’
…E8GRAZa-jdKPqU+++TI/TemporaryItems/5/lime-lychee.lua:1226: in function ‘load’
…E8GRAZa-jdKPqU+++TI/TemporaryItems/5/lime-lychee.lua:1568: in function <…e8graza-jdkpqu>
(tail call): ?
…2UDNZbLE8GRAZa-jdKPqU+++TI/TemporaryItems/5/main.lua:34: in main chunk
Runtime error: …E8GRAZa-jdKPqU+++TI/TemporaryItems/5/lime-lychee.lua:420: attempt to index global ‘self’ (a nil value)
stack traceback:
[C]: ?
…E8GRAZa-jdKPqU+++TI/TemporaryItems/5/lime-lychee.lua:420: in function ‘getTileIDsFromBase64’
…E8GRAZa-jdKPqU+++TI/TemporaryItems/5/lime-lychee.lua:499: in function ‘newLayer’
…E8GRAZa-jdKPqU+++TI/TemporaryItems/5/lime-lychee.lua:1226: in function ‘load’
…E8GRAZa-jdKPqU+++TI/TemporaryItems/5/lime-lychee.lua:1568: in function <…e8graza-jdkpqu>aryItems/5/lime-lychee.lua:1019>
(tail call): ?
…2UDNZbLE8GRAZa-jdKPqU+++TI/TemporaryItems/5/main.lua:34: in main chunk [import]uid: 11904 topic_id: 4794 reply_id: 16240[/import] </…e8graza-jdkpqu></…e8graza-jdkpqu>
Hmm, very strange. It looks like it is calling the “getTileIDsFromBase64” function which it shouldn’t be unless your map in compressed (this isn’t working yet). Make sure your map is being saved in either XML or CSV.
If you are already saving in those formats I’ll take a second look. [import]uid: 5833 topic_id: 4794 reply_id: 16262[/import]
You were spot on. You see I’m traveling and using a new Mac Air I just set up. I totally missed setting the preferences in Tiled so it would save as XML. Once I made the change the problem went away and my animation timing works GREAT!!! Well done and thanks!!! [import]uid: 11904 topic_id: 4794 reply_id: 16263[/import]
Awesome!
However you have still found a bug as Lime really shouldn’t just fall flat on its face when it comes up with a compressed map, it should gracefully sit down and kindly inform the user that they have made a mistake.
[import]uid: 5833 topic_id: 4794 reply_id: 16265[/import]
Yes there is a silver lining to every cloud! [import]uid: 11904 topic_id: 4794 reply_id: 16266[/import]
[import]uid: 5833 topic_id: 4794 reply_id: 16268[/import]