Spriter/C2 - (9-16-2019 - bug fix)

From the Asset Store
Rotate & Animation for 16 Direction & Mouse Direction
  • Hey,

    So I'm having a problem with resuming animations after they have been paused.

    Basically on startup I pause animation playback for each spriter object instance. Each spriter object instance follows the position of a sprite/physics object with a matching value stored in an instance variable. When the sprite/physics object collides with the floor I resume playback. However, this does not happen. I've also tried to play the animation again but it also doesn't play.

    If I remove the pause and just tell it to play an animation on the collision it works fine. Which tells me I have set up my actions correctly. However, this means the initial animation plays and then the next animation plays on the collision. Whereas I want the initial animation to play on the collision and then when that animation is completed it plays the next. So I'm not getting the desired affect.

    I've also tried to use play current animation to 0 instead of pause. Then on collision I've tried to set the animation from the start or from current position, but this seems to play the animation backwards and doesn't fire an animation complete event.

    I'm using plugin release 12/30/2014

    Any ideas?

    EDIT: After some jiggery pokery if I pause and on collision I resume and play the 'walk' animation. My events detect if the walk animation is being played and so the robot goes into a patrol state. So the robot starts sliding around on floor, which means it is playing walk, but visually the robot is not. Which suggests it has switched animation, but is not resuming playback.

  • nblumoe sorry for the late response. I must have dismissed the initial forum notification without realizing it shortly after your response. No ETA just yet, though good progress is being made on the reference implementation, which will be the basis for not only the sub-entity part of this plugin, but also a much more efficient plugin in general. The easiest workaround I can think of would be to actually have two separate entities and use events to constantly set say the torso entity object onto the legs at every tick.

    TheWyrm if possible, please send me the capx to lucidssn@brashmonkey if possible, because it sounds like you're doing everything right. It will help me to find if it's a simple mistake in events, or an actual plugin bug

    mhazaru thank you. No simple way I can think of. You could either have two separate c2 objects for the fading in and fading out and use events to do it, or you can create a Spriter animation that executes the fade, though the last is less than ideal since it might be difficult to do this and it would require clones of all the objects. When entities are further along in Spriter, and implemented in C2, there should be easier ways to do this in Spriter as well.

  • lucid - a couple of thoughts - today I was thinking it would be cool if you could put a background image in the spriter window (perhaps jpg to keep the file small?). That would allow you to export gifs and screenshots with more interesting, context appropriate backgrounds. The other question is, using character maps, would it be possible to spawn say a certain type of enemy and randomize which body parts are used, making a great variation in the enemies would look? One last thing - I'm still wanting to be able to change effects applied to particular instances. That would allow me to create much more variety just by, for instance, changing the hue of an enemy character. It would allow for easy creation of bosses, etc. Thanks, Morgan.

  • lucid - I've just come across something odd which I think might be a bug.

    I've attached the capx file which I've used to demonstrate it.

    To demonstrate the issue, press any key when the capx has loaded and you'll see an icon appear in the middle of the screen. It shows a #1 but it should show #2

    All I'm doing is applying a character map when the object is created.

    You'll see that once there is an existing object on the screen and you press any key again then it sets the character map correctly.

    I had a quick look to see if there was anything glaringly obvious in the code but I'm not entirely familiar with the Construct SDK. All I could think of is that it's not populating the c2ObjectArray array prior to the calling of the appendCharMap function, but I'm probably way off base

    In the meantime as a workaround, I'm creating the object at the start of the level, off the screen so it's already preloaded the character maps. Seems to work ok for now.

    Cheers

    Chris

  • lucid - a couple of thoughts - today I was thinking it would be cool if you could put a background image in the spriter window (perhaps jpg to keep the file small?). That would allow you to export gifs and screenshots with more interesting, context appropriate backgrounds.

    With the pro version you can choose a watermark for the background or foreground when exporting, though you don't have total control over the exact location. Eventually, some of the longer term features planned for Spriter should make it easy to do something like this, though.

    [quote:1eofouw1]The other question is, using character maps, would it be possible to spawn say a certain type of enemy and randomize which body parts are used, making a great variation in the enemies would look?

    You could do this. You would have to setup events to handle randomly applying the actions to add character maps, but that's definitely one of the things I envision people using character maps for.

    [quote:1eofouw1]One last thing - I'm still wanting to be able to change effects applied to particular instances. That would allow me to create much more variety just by, for instance, changing the hue of an enemy character. It would allow for easy creation of bosses, etc. Thanks, Morgan.

    Yes. Unfortunately I can't give an ETA as I already missed the previous. Aside from minor bug fixes, everything plugin related is going to happen after I adapt it to use the reference implementation I'm still working on.

    lucid - I've just come across something odd which I think might be a bug.

    I've attached the capx file which I've used to demonstrate it.

    To demonstrate the issue, press any key when the capx has loaded and you'll see an icon appear in the middle of the screen. It shows a #1 but it should show #2

    Thanks for the helpful capx and bug report. That is definitely a bug. I will put it on the todo list.

  • Awesome program!!! : -)

  • Can somebody answer me, what are the best settings (visually) for a spriter project and how to prepare my assets correctly? I tried spriter in a test project, but the output ingame is not so smooth (i mean not the animation speed, the animation works very smooth), but the images are jagged or blurred. Is it better to import my images very big in spriter and scale down in C2?

  • lucid

    I posted back in dec (page 129 of this thread) I did manage to solve the problem. Seems to have been a corupt file. Reverted back to a much earlier version of my project. With both the latest updates of Spriter and the plugin it's working fine. I tried to recreate the problem. again and again without any luck. I must have corrupted the file some how. Thanks for your help regardless everything is ok now:)

  • Awesome program!!! : -)

    Thanks!

    Can somebody answer me, what are the best settings (visually) for a spriter project and how to prepare my assets correctly? I tried spriter in a test project, but the output ingame is not so smooth (i mean not the animation speed, the animation works very smooth), but the images are jagged or blurred. Is it better to import my images very big in spriter and scale down in C2?

    Are you importing using the scml plugin or exporting to pngs from Spriter and importing those?

    lucid

    I posted back in dec (page 129 of this thread) I did manage to solve the problem. Seems to have been a corupt file. Reverted back to a much earlier version of my project. With both the latest updates of Spriter and the plugin it's working fine. I tried to recreate the problem. again and again without any luck. I must have corrupted the file some how. Thanks for your help regardless everything is ok now:)

    Glad everything's working now. Thanks for the update.

  • lucid: i am using the scml plugin and the latest version of spriter

  • Hmm. The scml plugin uses regular C2 sprites to assemble your character, so the images should look the same quality as any C2 sprites. Just make sure they are large enough to look good when your game zooms in (if it does), and they should work fine. It's also possible you have point sampling in your project properties. Please let me know if this helps.

  • lucid - A while back you mentioned that there still needed to be some work done between you and Ashley to get spriter working better with construct, something about developing a better importer or something along those lines? Has that been achieved yet? or is there still work to be done.

    What currently works/doesnt work with spriter in construct?

    thanks

  • justifun, currently:

    works: animation, collision boxes, action points, sound effect triggering, character maps, variables, events

    doesn't work yet: sub-entities

    Aside from that there's general improvements to the plugin for optimization and additional features, but it supports all Spriter features aside from sub-entities.

  • I gave spriter a go again, followed the instructions from the video and i'm getting a javascript error when first starting the game.

    Its a brand new scene with the greyguy example file .scml file being imported.

    Javascript Error!

    Uncaught Syntax Error: Unexpted token <

    line 1 (col 1)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • lucid: i think my images was too small, because this i get this artifacts, special when i rotated something. It also seems to be a display problem, when you use colors with big contrast differences (like black/white) and the sprites move too fast.

    justifun: You changed the scml file on the spriter object to .scon? Maybe this gives the error.

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