Config file and animation

Hi!

Was trying to set up animation sequences with .json files but I just get an error setting them up.

It looks like:

{  
"HasBody": "",  
"IsPlayer": "",  
"IsAnimated": "",  
"animIdle": { "startFrame" : 1, "frameCount" : 2, "time" : 5000 },  
"animFalling": { "startFrame" : 3, "frameCount" : 4, "time" : 500 },  
"bounce": 0.0,  
"density": 10,  
"friction": 1.0 ,  
"isFixedRotation" : "true",  
"sequences": ["animIdle", "animFalling"]   
}  

Problem seems to be with the animIdle and such, stops with an error getting a table when expecting a string in lime utils. So how do I define different sequences of animation? I works in Tiled but how should it look when put in a .json config file? [import]uid: 17969 topic_id: 35379 reply_id: 335379[/import]

Hi @borgb,
I’d have to see the parse results (the output you get from your JSON parse/read), but at first glance, it looks like you’re pulling a table of 3 “values” in the “animIdle” field. Are you trying to pass that full table to the sprite setup? Or, are you further parsing those sub-values? If you can post more of your output results and parse procedure on the “animIdle” field, it will be easier to determine what’s going on.

Brent [import]uid: 200026 topic_id: 35379 reply_id: 140646[/import]

I am setting up a player tile in Tiled and telling it that it should use the config file that I pasted above. This then is put into the Lime module and it does its “magic”. Only it seems that the magic looses its power when there is another table in the config file.

used this tutorial:
http://lime.outlawgametools.com/tutorials/14-config-files/

seems to be possible to do like I have done, although it dosent work so got the feeling Im missing something. It works like a charm to enter the values into tiled but would be easier to just point to a config file. I can always make it work in other ways, would just be nice to know if there was a way to get it to work with the config file.
[import]uid: 17969 topic_id: 35379 reply_id: 140650[/import]

Hi @borgb,
This is a question much better addressed by the Lime team, since it’s fairly specific to that product. Have you contacted them already? They can certainly provide a more detailed answer about this.

Thanks,
Brent [import]uid: 200026 topic_id: 35379 reply_id: 140808[/import]

Thats why I posted in the Lime section of the forum :slight_smile: If anyone here knew then that would solve my problem. If not I could post it here if I found it so others could find the solution if any when searching the forum. [import]uid: 17969 topic_id: 35379 reply_id: 140869[/import]

Hi @borgb,
I’d have to see the parse results (the output you get from your JSON parse/read), but at first glance, it looks like you’re pulling a table of 3 “values” in the “animIdle” field. Are you trying to pass that full table to the sprite setup? Or, are you further parsing those sub-values? If you can post more of your output results and parse procedure on the “animIdle” field, it will be easier to determine what’s going on.

Brent [import]uid: 200026 topic_id: 35379 reply_id: 140646[/import]

I am setting up a player tile in Tiled and telling it that it should use the config file that I pasted above. This then is put into the Lime module and it does its “magic”. Only it seems that the magic looses its power when there is another table in the config file.

used this tutorial:
http://lime.outlawgametools.com/tutorials/14-config-files/

seems to be possible to do like I have done, although it dosent work so got the feeling Im missing something. It works like a charm to enter the values into tiled but would be easier to just point to a config file. I can always make it work in other ways, would just be nice to know if there was a way to get it to work with the config file.
[import]uid: 17969 topic_id: 35379 reply_id: 140650[/import]

Hi @borgb,
This is a question much better addressed by the Lime team, since it’s fairly specific to that product. Have you contacted them already? They can certainly provide a more detailed answer about this.

Thanks,
Brent [import]uid: 200026 topic_id: 35379 reply_id: 140808[/import]

Thats why I posted in the Lime section of the forum :slight_smile: If anyone here knew then that would solve my problem. If not I could post it here if I found it so others could find the solution if any when searching the forum. [import]uid: 17969 topic_id: 35379 reply_id: 140869[/import]