bar movement stop

0 favourites
  • 5 posts
From the Asset Store
Health, Weapon & Rage Bars for your Games. Easy to use & Customize.
  • hey guys! In need of some help yet again (still too noob).

    I want the bar (labelled Chakra) to maintain its length while the animation(sprite 2) is playing. then when its done to return to its original length. I've been playing around with it but still no use <img src="smileys/smiley19.gif" border="0" align="middle" />

    dropbox.com/s/ckw1i23x7g72136/random.capx

    Hopefully its not too hard! I've added my cap file as it probably is a bit hard to explain through words.

    Thanks again guys!

  • I can't understand very well what you mean, but I think you're mistaking "animation" for some other thing.

    This is the Sprite2 object:

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

    And it's animation name is "boom":

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

    So, if you want something to happen when it's animation has stopped playing, you have to set an event like "Sprite2-> Has animation "boom" finished playing", like this:

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • andreyin hey there thanks for taking the time to help me out!

    Hm let me try rephrase it. Basically I've set it so the bar (the yellow one) needs to be greater than 1(width) for the animation sprite 2 to play.

    This is done by holding the down button (charges the bar) and then press the red button.

    What im trying to do is make it so the bar stays at the length i held it to when the animation plays. then after the animation finishes the bar goes back to the initial length.

    :S really sorry if this is still confusing. Thanks again for the help though! <img src="smileys/smiley1.gif" border="0" align="middle" />

  • i would use a system wait for the duration of the animation then set the chakra bar to its original length.

  • Please don't take this personally, but it's very difficult to make sense of your description, and ever more so, the capx. It's a lot easier to provide assistance if the capx is concise, and your desired result is fully explained.

    I'm not sure exactly what you're goal is, but I think I may have deduced it. I'm guessing you want the player to hold the down arrow button to charge up the yellow bar, and if the the player presses the red button while the yellow bar is charged, Sprite 2 appear. You also want the bar to maintain its width for the duration of the animation, and then return to it's original width.

    Andreylin mentioned that you can trigger something to happen at the end of Sprite 2's animation, but that won't work in this case, because you don't really end Sprite 2's animation, you just set it to invisible after the animation has completed. Therefore, the quickest fix I can think of was to only have the yellow bar change width when the Sprite 2 is invisible.

    I hope this is what you were looking for.

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