Example Spriter/Capx using animation Events/Variables

0 favourites
  • 5 posts
From the Asset Store
Very simple code without excess options (15 events for server and 11 events for client)
  • I have been messing around more with Spriter and wanted to take advantage of the events, tags, and variables that can be added to the animation.

    I am able to get the Events to trigger in C2. I also am able to get Tags to work. However, I am having issues getting the correct variable value when Events trigger.

    What I want is to have the Spriter animation variable change throughout the animation. The first 1/3 of the animation it will be 3, then 2/3 it will be 2, and then the rest it will be 1. In Spriter at each event key frame I have the variable active and is setting the actual value. I do it like this:

    time 0 value 3

    time 334 value 2

    time 667 value 1

    When updating a text box in C2 upon each triggered Event I am not getting the expected 3, 2, then 1. Oh, and it looks like the animation needs to stop then play for the trigger at time 0 to fire. It does trigger if its repeated.

    Does anyone have a simple Sprite file and capx they can share that shows what I am asking?

    Thanks!

  • is spriter the program from steam? I got it but never really used it in favor of the art from construct 2... shame there's no way to rotate individual highlighted parts from the drawing scene. it would make the animating so much easier

    also in construct, you should be able to say, animation is playing frame 1 set variable to 3. eg:

    animation frame x (wherever 1/3 is) set variable to 3

    animation frame x (wherever 2/3 is) set variable to 2

    where you choose to set it is up to you to get an equal balance

    this will not use the time event, but will be sooo much simpler. I think if there is a specific time, construct 2 uses milli seconds, so the event requires exact timing. even 3ds games have frame errors

    i used spriter once, and couldn't figure out how to transfer the animation to c2, so gave up basically.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Aher0

    Yeah, I may end up just using variables in C2 which if fine. I guess I wanted to know more for a learning experience hehe. Anyhow, check out this link for adding Spriter.

    http://brashmonkey.com/forum/index.php? ... nstruct-2/

    The biggest thing is changing your save settings in Spriter and saving both .scml and .scon files. Then drag those files to the layout in C2. Oh, and make sure you have the Spriter plugin downloaded and in the correct folder. Its quite powerful.

    I have a timer that I was thinking about changing from using many events to using an animation from Spriter. The triggers would tell me when to change a variable. I may just do that and use the triggers and not worry about the variables in the animation.

    If you have some time give it another shot <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">.

  • i will do, this will be great. i can see how epic it would be to use spriter, actually the first question i asked on this forum was how to merge spriter with c2! ... no1 answered lol.

  • The Spriter plugin has been updated and resolved these issues. I also got some feedback from the Spriter forum regarding plugin usage.

    http://brashmonkey.com/forum/index.php? ... variables/

    Thanks! <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)