Byakko's Forum Posts

  • I set a looping animation for something like an idle animation. The idea is to have the sprite play it for a set amount of time that can be controlled by the event sheet.

    For example, you have a head swaying idle animation. It's on a loop/ping-pong. Assume you already don't care about clipping or made it so it doesn't matter.

    You set up an event to have that animation play for random(4) seconds or something similar.

    Therefore, the duration of that idle animation lasts for a random amount of time each time that animation would play.

    Basically, I don't care about the full length of the animation at all, because it was made to repeat and be clipped. I just want to control how long it stays on-screen regardless of its own length.

  • Same, I can't post anything the first time round, even within a few seconds of a new page.

  • This is the trouble I've been having: scirra.com/forum/topic66077.html

    It's all around coming up with ways to just tell Construct 2 to play a looping animation for a set amount of time and then do something.

    But because the animation is never 'finished', the event trigger On Animation Finished cannot be used. So the event trigger Is Playing is used. Which then seems to cause it to go into an eternal loop because the animation is always 'Is Playing', and using system wait doesn't seem to stop it and make it go to the next action.

    I've tried using various plugins and behaviors from Rex, but none work.

    I just would like a native Duration feature that can be called in the event sheet that works correctly with looping/ping-pong animations.

  • Boop

  • My file: dropbox.com/s/svllzhvoczdit2y/Animation%20Test2.capx

    Intended behviour:

    On start of layout, Deer spawn with a randomly chosen idle animation (this part works)

    After that, you can see the following conditions for when different animations finish; i.e. if the DeerUp animation finishes playing, then choose from two other idle animations to play after.

    The problem is with the two idle animations (DeerEat, DeerWag) that are set to both Loop and Ping-Pong. I want them to play for a set amount of time (which I tried to do using Wait and random(3,6)), and then go into the appropriate animation afterwards.

    But because they're on loop, I can't use the On Animation Finished event. If I use the Is Playing event, it seems to go into some kind of logic loop (the animations are 'always playing)) and I end up with animation errors. Notably, hyper-headbanging Deer.

    I've tried using sub-events, but they will not work for the looping animations. You can also see two other events->actions I put on disabled after testing. They worked fine for the two 'normal' animations as event triggers on them finishing.

    Any help would be greatly appreciated!

    Edit: Testing with rex's Duration behaviour - scirra.com/forum/behavior-duration_topic53395.html

  • I'm trying to not have to use physics if I can. Mostly because if I do, I'll have to make more of my platform game physics based than originally prepared for.

    I thought the Bullet behavior with the right gravity settings would work pretty much the same.

    Anyway, thanks for all the feedback! It'll help to streamline what I need to do for the player sprite and weapon now. My only concern now is the same animations for both with/without spear would actually look all right, but that's something I'll handle when it comes.

  • Hi, sorry I don't really have example images, but basically, my player-character is suppose to use a spear that can be thrown at enemies. When thrown, it's suppose to then stick to whatever enemy/ground it hits, and the player-character will no longer hold a spear till they go over and pick it up.

    The thing is I'm not sure which is the best way to set-up the sprite, I'm thinking the following ways:

    1) Make spritesheets for holding the spear and without. When spear is thrown, switch character sprites with no-spear ones, spawn a cloned spear to be the actual projectile. Then switch back to regular sprites after 'regaining' the spear.

    Or

    2) Make spear fully detachable and independent of player-sprite. Pin it to image point on hand of player-character. Apply Bullet behavior as before.

    Personally I'm hoping option 2 is possible, but I'm concerned with how 'floaty' and odd-angled the spear sprite would look attached to the player-character. I feel I might have to adjust it's rotation frame-by-frame indepently of the player-character, and I'm not sure if that's possible?

  • Nothing much updated, since I'm working on animations now, but visuals of my game refined a bit further:

    <img src="http://snag.gy/Q69vA.jpg" border="0" />

  • <img src="http://snag.gy/Ob0wX.jpg" border="0" />

    This is mostly an ongoing concept, but I'm pretty happy that I figured out what effect layers and such to use. The player character is a placeholder and I need a better tiled main background.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So keep the main deer sprite in the default bounding box shape; should I keep the transparent collision sprites as boxes too or collision polygons? Would it be significantly more memory intensive to have more precise transparent sprites by using the collision polygons to shape them?

    Also, I attached the transparent sprites in the events sheet right? On System start-up, etc. etc. (I saw someone post how to do this so I think I can get it).

  • Hi, just would like quick advice on this part of my project. I'm making this following sprite, a Deer:

    <img src="http://i.imgur.com/HVgfo2m.jpg" border="0" />

    If I'm using a single standard collision box, it would have to be about this big in order to cover the entire sprite. But it's a little too large and imprecise.

    I want it so that my Player character, shooting a Spear projectile, if it hits the 'head' of the Deer, it is automatically killed, whereas a body shot would just cause it to take damage but run off.

    So this is what I'm thinking:

    <img src="http://i.imgur.com/vhfweHO.jpg" border="0" />

    My concern is I have no idea what would be detected at the point they overlap.

    The thing is I've read up on the forum, several methods, and I'm not sure which is best.

    One has it that I could use invisible sprites pinned to image points on a single large rectangle Deer sprite to act as alternate collision boxes, and maybe have the spear detect the Nearest Imagepoint/collide-with-box and react appropriately.

    Another I read up is to use Containers. I have no idea what benefit would that give? Would that allow me to organize the collision boxes on multiple Deer, but allow me to detect if there was a 'headshot' on each individual one?

    And then there's the Collision Polygon feature.

    <img src="http://i.imgur.com/BLeB7Jl.png" border="0" />

    I haven't tested this yet. I've already set-up a simple prototype of my game using the standard boxes. But with Collision Polygon, I use the sprite directly? But I can't seem to see/preview the Collision Polygon on the layout itself, and the sprite is still selected as a giant rectangle.

    So I don't know how to get precise collision checks that Collision Polygon seems to give?

    Sorry if these questions were asked multiple times, but just that the various methods made me confused as to what the best approach was.

    There will also be a second, more massive mob I'm making that may require me to detect its legs, head, and main body. Again I'm unsure whether a large 'general' collision box is best, with invisible pinned to imagepoints collision boxes; or a Collision Polygon?

  • Looks fantastic and a great opportunity! So the livestream is being hosted on that webpage?