I am a game programmer who programs in LUA with LOVE2D. I love using moho studio and I need to convert my animation into a custom animation file format I have created, Because I'm not really a fan of using frame-by-frame raster image animations. Is there a scripting function in Moho Studio where it returns all the animation and vector data?
Just wanna show you images my current work because why not:
animation format WIP (currently a table)
Running in-game
Reference Animation
Creating a Custom Animation Format
Moderators: Víctor Paredes, Belgarath, slowtiger
- synthsin75
- Posts: 9968
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: Creating a Custom Animation Format
You would have to use multiple functions to get the layer transforms and point motion of that example individually.
Or read from the Moho file format. Either way, creating your own format sounds very daunting.
Or read from the Moho file format. Either way, creating your own format sounds very daunting.
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Re: Creating a Custom Animation Format
I understand.synthsin75 wrote:You would have to use multiple functions to get the layer transforms and point motion of that example individually.
Or read from the Moho file format. Either way, creating your own format sounds very daunting.
For starters, could you give me a sample code that could only give a single layer transform X & Y data if possible?
Thank you in advance for replying
- synthsin75
- Posts: 9968
- Joined: Mon Jan 14, 2008 11:20 pm
- Location: Oklahoma
- Contact:
Re: Creating a Custom Animation Format
Code: Select all
local frame = moho.frame
local xRotation = moho.layer.fRotationX:Getvalue(frame)
local yRotation = moho.layer.fRotationY:Getvalue(frame)
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/