E2GameStudios's Forum Posts

  • Not 2 minutes after I posted this I figured out at least one way to do it...

    In the event sheet for the main menu in my "on start of layout" event I added an action of create object (the name of my sprite) followed by an action to set visible (with invisible selected).

    I had already added a "include event sheet" (via right click in a open are of the main menu event) that may also be required but I havent tested removing it yet.

    Hope that helps someone.

  • I have spent almost 2 hours search the forums because I was certain many people before me have experienced lag when switching between layouts (specifically to a layout with full screen sprite animations that take up a lot of memory)...and I found a lot of stuff on custom loading screens and linking layouts in the event sheet...but nothing that will specifically let me load the sprite assets for one layout when say the main menu is loaded...so that when you load the next layout it doesn't lag for 5-10 seconds.

    Basically I have a fairly large Level Selection Sprite object on my "level selection" layout with multiple animations associated with it. I need either a way to include those assets in memory on load of the main menu so that it goes straight to the level selection layout with no lag or I need a way to show a loading screen between the main menu and the level selection menu so the player doesn't think the game locked.

    Any ideas, suggestions or re-routs to forum posts I missed on the topic would be greatly appreciated.

  • lol...now only if I can figure out how to do that!

  • Ok since we are tearing though my programming tasks the next thing I am trying to do is to establish a method that would allow a 4th sprite object to launch a related layout depending upon which animation the original LevSel sprite object is currently on. In our example file imagine I had a a button at the bottom of the layout and that if a user is currently on "animation2" of the levSel sprite when they click on that button then a layout dedicated to "animation2" is launched. Likewise...if "Animation1" or "Animation3" has just played and they click the button they would be directed to a layout for "animation1" or "animation3" (respectively).

    It would seem to me that since we have successfully tied the number of touches to the "Level" global variable then we could use the current number of touches (the result of whatever positive or negative numbers are generated through Forward or Reverse clicks) to a given sum and use that number as a method for defining which layout to load.

    For example: If the player clicks forward button twice and the reverse once they would find themselves at the start frame of "animation2"...or from a value standpoint that would be +1 +1 -1 in the touches variable which would result in a +1 total number of touches (1+1-1=1). Maybe I am thinking about this all wrong but it seems that would allow me to essentially assign each animation a static touches value and that I could use that to direct a player to a specific layout. Am I heading in the right direction with this?

  • It seems I lack the Rep to respond to your PM. :( However, you mentioned that you located me via external means. Reach out to me using that method and we can discuss options for when you have more time on your hands. Also if you do a facebook search for "E2 Game Studios" you can see more about our current project. I do environmental Art, GUI, models and textures etc. Not much on character art though. I have to contract that out along with Music.

  • Very cool...I had to make one slight adjustment to the global variable (from 3 to 4) as when it was set to 3 it wouldn't actually play animation3 prior to halting the forward animations. If I am understanding this correctly...if I were to add animations to the sprite object I would simply increase the global variable a corresponding number of times.

    Does that sound about right?

  • Try Construct 3

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

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