E2GameStudios's Recent Forum Activity

  • Something else I am noticing is that once I reach the end of the sequence (the last animation: "animation3) clicks forward get recorded...even though there is no animation to go to next (or after my latest event addition the animation stops)the click is retained in the "Add 1 touches" action associated with the "Touches" instance variable...and the back arrow must be click an equal number of times for the previous animation to even start running in reverse. Ideally, for my purposes the "Add 1 touches" would have a condition that prohibits the recollection of touches that would exceed the total number of animations associated with the sprite object. That way...if the player is on the last frame of the last animation in the series not only does it halt the animation from playing again it no longer records the touches in the "Add 1 touches" action so the number of touches on the forward sprite object from that point need not be repeated an equal number of times on the reverse sprite object.

  • For the record I have figured out how to do this for the Last animation in the series by using an event where the Sprite has a compare frame of 7 (the number of frames in the animation) followed by a sprite stop animation action but I can seem to figure out how to do it one the 1st animation of the sprite.

  • Now if I may be so bold I would like to ask how I might prevent the animations at the beginning and end of the sequence from repeating. In our example file we have the steering wheel with "animation 3" (or animation3 in the sprite animations listing). If the player is at the end of the available animations I would like a click on the right arrow to do nothing (at this time it runs the animation again)...however I would like to preserve the functionality of going in reverse from that point. Inversely, if the player is on "animation1" a click on the left arrow should do nothing (presently it runs "animation1" in reverse) but the player is free of course to play the animation forward if they click the right arrow.

    Concerning the credits would you like just your Forum user name or your real name in them? If you would like your real name you are free to PM me on that. Your assistance on this has been invaluable and giving and to those who have helped me is the least I can do. If you ever feel like making some money on the side PM me on that too...my company s small but I do have a budget for contractors.

  • Your example is fantastic! It does far more to help me understand the specific programming nature of my issue than the posts but the posts help me understand the terminology so thank you on both fronts.

    I still have a long way to go to understand the expressions because I come from an Art background in my professional Game development experience rather than a programming. Things like "self.AnimationFrameCount-1" make sense when I see them but knowing how to create them still eludes me. My hope is that will come with time but seeing those expressions in a layout as it pertains to my specific needs are spectacular and I very much appreciate your efforts.

    On the mouse event...I realized that after I posted it but thanks for stating it as it may be of use to another reader at some later date.

  • I made a quick demo that represents what I am trying to do.

    I left my latest attempt to run the animations in reverse in place but toggled disabled and I set it up as an on click rather than a on touch in case you don't have a touch screen device. I know you can easily replace that condition but you are helping me so I figured I could make it easy.

    dropbox.com/s/akuq9oc9lijhukc/Touch_Click_Animation.capx

  • There is an important distinction between your project example and my own that may be of note. In your example you have your sprite object with 5 animations and each animation has 1 frame. In my project My LvlSel Sprite object has multiple animations as well...but each animation has 11 frames. In my set up when the player touches the designated object (the "Foreward" sprite object) Animation 1 runs through all 11 frames...then on the next touch it runs through all 11 frames of the 2nd animation...and so on. What I need now is for a player to be able to touch the "Reverse" object and have the animation (which ever animation of the LevSel object is CURRENTLY on) run in reverse. Then if the "Reverse" object is touched again run the proceeding proceedinganimation in reverse. Inversely if the player touches the "forward" object the LvlSel sprite runs the animation in forward order from where ever it left of last.

    I know I need some kind of code logic that 1st checks to see what the current animation just finished playing. Then 2nd, depending on what animation of the levSel sprite object it is on it runs another animation of that sprite object in either forward or reverse depending upon which object is touched (The "Forward" sprite object or the "reverse")

  • Thank you so much for the Capx. Once I got the latest beta version I was able to open it and compare your project to mine to see where I had gone wrong. I can get every animation to run in order with each click/touch. I even figured out how to use another sprite object (A "Forward" sprite) to be the source of the on touched event and still affect the animated sequences of the original sprite.

    Now what I am trying to do is get the animations to run in reverse order if I click a 3rd sprite (called "Reverse"). I am not sure if I can somehow get the animations to run in reverse using the event sheet through some kind of event/action pairing...or if I need to set up "reverseAnimation1, 2, 3" in the original sprite's animation (and just re-import the frames and reverse them via right click in the Animations Frames window)...or just make a completely separate sprite object ("lvlSelRev" perhapse?) with reverse versions of the original animations and worry about creating or destroying sprites depending on if the player touches the "Forward" sprite object or the "Reverse". Do you have any suggestions? IF t all possible I would prefer to use the existing animations in the existing sprite object to but I would have no Idea how to set up my event sheet for that.

    On a side note...I am making a Game I intend to sell in the windows 8 app store. I have a space in the End credits for people in the forums who help me out and unless you have any objections I would like to include your name or username there.

  • By the Way: I lose and I get no awesome Balls! Fun game Man.

  • should it matter that the animations are named differently? and do I need to add separate actions for animation associated with the sprite object?

    like so:

    <img src="http://i1310.photobucket.com/albums/s651/E2GameStudios/ontouched2_zps3da472ed.jpg" border="0" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So if i am understanding correctly I just append my sprite animations to allow for the touch count to find them...like "Act1toCh1_" (resulting in Act1toCh1_1) or Ch1toCh2_2?

  • Vmars316,

    Some of these responses may seem negative but TRUST me these guys are life savers once you get in the mix so dont be discouraged. Also I certainly understand the impulse to dive right in and start using C2 without the manual or the tutorials (it's a great program!) but unlike most manuals or beginners guides these actually help and are well worth the time to read. You even get achievements/rep for reading the manual.

    See you in the forums!

  • I am a newbie here so bear with me please.

    I think I understand the 1st part of your instructions: You are saying to create an instance variable within the properties of the sprite named "touches"...with an initial value set to 0.

    But I am a bit confused with the 2nd part: I have created an "On Touched (sprite name)" event. I go to Add action/sprite (the one with the animations and the instance variable from step 1)/add to...I select the only option in the drop down called "touches"...set the value 1...click done.

    Then I click add action again...select the sprite (with the animations and new instance variable associated with it)...choose set animation...type the name of my 1st animation between the quotation marks and then add &Spritetouches behind that with no spaces. I leave beginning selected in the FROM dropdown and hit done.

    I end up with this:

    <img src="http://i1310.photobucket.com/albums/s651/E2GameStudios/ontouched_zps244541c5.jpg" border="0" />

    In the example my sprite object name is "LevSel" and the animations associated with that sprite are "Act1toCh1", "Ch1toCh2", etc. I have the Stop Animation set up to prevent the 1st animation from running before any touches happen.

    Unfortunately this does not appear to work. What am I missing?

E2GameStudios's avatar

E2GameStudios

Member since 4 Mar, 2013

None one is following E2GameStudios yet!

Connect with E2GameStudios

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies