Jump to content

Small Example Spriter (scml) files for the metadata features.


Recommended Posts

Hi everyone,

 

Here are a handful of example Spriter files specifically with some metadata set up in the animations for those working on implementations who want to include support for the metadata.

 

1) Variables: This scml uses a string type Variable in the main metadata to keep track of the current letter that's being displayed by the robot.

 

https://www.dropbox.com/s/65vow8a63efaiee/Variable.zip?dl=0

 

 

2) BoxTagVariable: This scml Includes the following important metadata related things:

  • The Slide animation uses a numeric(float) based variable in the main metadata which could be used to control the x-velocity of the character in the game engine. Ideally, the value would tween between key-frames which have a different value set for the x-velocity variable.

 

  • The Punch has a Collision box called "AttackBox" which itself has a numeric value set up in its private metadata to keep track of the current damage the hitbox should inflict on enemies. The value should tween between keyframes.

 

  • The Punch animation also includes a tag in the main metadata which is used as "state machine data" to tell the game engine whether or not the character is currently "stuck in a move" (can not respond to player input) or not.

https://www.dropbox.com/s/es3e406n6qkg7n9/BoxTagVariable.zip?dl=0

 

 

3) PointsTriggers: This Spriter file has the following metadata examples:

1) Both the "throw_knife" and the "throw_axe" animations have action points that appear at the apropriate part of the animation, which should give the game engine the spawning location and angle at which to create the projectile sprites.

2) Both of the animations also include triggers ("ThrowKnife" and "ThrowAxe") at the same moment the action points appear to tell the game engine to spawn the projectiles at that exact moment.

 

https://www.dropbox.com/s/j1x423529nbl0mq/PointsTriggers.zip?dl=0

 

cheers,
Mike at BrashMonkey

Link to comment
Share on other sites

  • 2 months later...

Has this happened to anybody?

 

brash_zpsdeu4sf7p.png

 

I followed the importing spriter file into contruct 2. I put the plugin where I was suppose to, ticked all the options from custom save options, saved a scon exactly same name as scml in the same folder as the spriter project. And this happens. Imports just fine, with no errors, but ya....This happens. I am figuring its something simple I am over looking or I just am cursed, lol. Please help!!! P.S. everything is up to date. (Spriter, the plugin, Contruct 2)

Link to comment
Share on other sites

Actually it isn't if you watch the video, in no way does the images go out of order. But I found if you delete the auto saves, this prevents this from happening. Although from what I understand there's no option to turn auto save off. The tutorial mentioned having a scon and scml copy with the exact name. When I saw the auto saves, I decided to delete them and Whola! BTW, this may not be of your concern, considering you are support for brashmoney and not construct 2. But, is there a simple way of fixing the walk animation? For instance, after I jump (and have both animations, jump and fall) and land, I am standing still. This is if I am still pressing left or right arrow. Or gamepad axis x greater than 0 or less than 0. I have to let off in order to get the walk animation again. I saw in the video a different event configuration. I just was trying to find a simpler way. I can get all the animations to work perfectly except those.

Link to comment
Share on other sites

If you make sure ALL "File->Other file Actions->Custom Save Options" are checked, the sprites should be aligned in a way that looks like the first frame of the first animation upon import BUT this is completely arbitrary.. the Spriter object should behave normally either way when you run the frame. (I forget which options make a difference in that regard, but it doesn't affect the functionality).

 

You did not answer my question.  I asked if you run the frame, does the Spriter object look and behave normally. I'm actually a long time C2 user myself, and have made several complete games using it for myself and clients. I know that before Edgar added a specific Custom save setting to Spriter, the Spriter objects used to always import without assembling the first animation in the C2 Editor.. Again, this is just for polish, and has no effect on the functionality of the Spriter object in C2.

 

If you go into "Edit->Settings..." in Spriter's menu, you'll see an "AutoSave" tab. At the top of the tab, there is a check-box. Clear it if you want to turn off auto save.

 

The autosaved files should have no effect at all on the imported (non-autosaved) SCML and SCON files. Auto save does not save over your file, it saves a new copy of your file with ".autosave" appended to the name. It should also save using the same custom save settings. If it does not, that's a bug.

​As for your specific animation changing needs in C2, I'd really need to see your .CapX to know the best solution for your problem, but it seems like a common and straightforward issue where your animation triggering events/actions are conflicting with each other. I'm sure it would be a quick fix if I could see and edit your .CapX.  Feel free to email it to mike@brashmonkey.com  Of course I'd share it with no one and delete it after sending it back to you.

 

Cheers.

Link to comment
Share on other sites

Thank you for your replies. And I never did try it when it was all jumbled. I just noticed after I deleted the auto saves it quit being jumbled. So you're prolly right on that. I just like when it works the same for me as others. When it doesn't, I question why. Its working fine now though. And I saw the check mark. I didn't notice it before. I unchecked it. And I found a solution, but I am unsure if its a good one. I mean, I will just have to email it to you like you said. I am pretty tired and am going to call it night soon. I am just very anxious to get started. I don't have much patience at times, while other times I have all the patience in the world. I really like Spriter and Construct 2. They have potential for making great games. Its for that same very reason I am thankful that you would look over it for me.

 

P.S. It maybe a bug or maybe I was unlucky, but I swear when I deleted the auto saves, it quit acting that way. 

Link to comment
Share on other sites

  • 5 years later...

Thank you for sharing those projects.  I've incorporated support for eventlines and point triggers into SpriterKit now at: https://github.com/pkclsoft/SpriterKit

It would be great to have an actual specification of the latest SCML/SCON documents from an implementation point of view.  I'm holding off adding the variables thing because there is no real information as to what variable types (other than I think String/Float) are valid, and how the engine should treat them.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...