Byakko's Recent Forum Activity

  • Edit: Figured it out. Instead of using a While loop, just used an Every X second event + conditions and works fine. Same link is the updated file.

    But which would be better to modify? Set Bullet Speed or Set Bullet Gravity?

    I'm trying to make my character have a variable 'charge-up' throw action. Basically, longer I hold down a button (Q), the further away the bullet (a spear) would go.

    This is what I've got so far: dropbox.com/s/ke33nga8k8dgu9h/Q%20Shot.capx

    Use arrow keys to move around. Q readies the spear, and on release, release it. W to return the spear to re-throw it.

    I'm using a global variable (Throw_Time) to test how long Q is held down. Then I set it a While loop to add 1 to Throw_Time with a delay of 0.3 seconds.

    Then on release, I'm trying to set the bullet(spear) speed to (Throw_Time)*200

    But the speed never varies, no matter how long/short I hold Q.

    I think my While loop for Q isn't working, but I'm not sure :(

    Could someone check it out for me (there's a lot of various events in the event sheet but I tried to mark out the relevant part with comments).

    Edit: Is it because the While loop is adding to the global variable too fast?

  • I can't find a way to manipulate the 'repeat count' of an image in the event sheet, except as just repeating one animation loop. Unless I can set "random(x,y)" in the image editor?

    However, thank you for the "Trigger once while/when true" special condition! That was exactly what I was looking for! Since the looping animations I were using were 'always true' which was the problem! I needed this system condition to tell it to count only the moment the animation starts!

    So yeah, all working as intended now!

  • Well the animation editor has a Repeat count/Repeat to property. If they can be controlled by the event sheet, it would solve a lot of problems. But I don't think it's possible?

    Edit: I eventually found a workaround that gets almost the same effect. But thanks, I'll try that when I get back to working on them.

    The thing is I tried rex's Duration and Timer plugins, which theoretically should work, but still caused this weird error where my Deer started headbanging erratically and the speed of the animations started going out of whack. As in, they were exceeding the speed I placed in their animation properties.

    I have no idea if it was because of some severe event conflict, or I found some kind of bug. It looked like it had something to do with using the 'Is animation playing' event with a looping animation and the action is "Wait X seconds"

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

Byakko's avatar

Byakko

Member since 7 Mar, 2013

None one is following Byakko yet!

Connect with Byakko

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies