Can I pair one animation frame to multiple animation frames

0 favourites
From the Asset Store
Selection frame like in RTS games, works both on mobile and desktop devices.
  • So, I hate to do this (I feel like an idiot and I am completely embarrassed to even ask, but I have tried for DAYS and DAYS and cannot quite get it, AND I am posting in the same forum as my last question so I don't make too many posts)...

    I am using the advice that SimoneT had provided (which is what I need). I have more images to use, however, and adding them to the Animation "CardFace" doesn't really help unless I increase my card tableau (right now its at 6x4 and I'd hate to increase it too much more).

    So, what I am trying to figure out is simply: when all matches have been made (in CardFace animation), reset sprite and go to CardFace2 animation, and replay, when all matches have been made (in CardFace2 animation), reset sprite and go to CardFace3 animation. etc.

    I figured out how to transition to a new layout with the same set up whenever all matches have been made, but I am still stuck with the same animation frames (CardFace).

    Using Include Event Sheet doesn't seem so helpful either, as it relates to my Sprite "Card" I guess I could make an event sheet for each sub-level of my level, but I don't have the space in this version, and just cannot get the full version quite yet.

    Any advice would be greatly appreciated!

    I do really feel bad about asking, but I am at a point of giving up... and after spending 6 months drawing my artwork and spending so long learning Construct 2, and finally starting to make my game.. I would not forgive myself if I did give up. I have tried... every day all day for too long.

    Thanks again, in advance.

  • Oh... I was under the impression that you already had a personal license...

    You should definitely look at getting a personal license at a minimum. It is well worth it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • KHC

    I made a few mods to my capx to allow you to change decks within one layout.

    You will note that the animation are sorted by DeckLetters, and I have created an array to store my 3 different decks. The last frame of each deck is the CardBack. Since my game has a 16 card tableau and I didn't want to change to much of my code, I call on the gNumberCards frame, since animation frames are 0 based.

    At the end of a deck, I add 1 to DeckLetters and mod(%) it to the width of my Array so that when DeckLetters goes higher than the number of Decks in my Array, it goes back to 0 and start back again. (I might have forgotten to set the width of my array to 3, so make sure to change that).

    If you need more help, don't be shy, you can PM me!

    https://www.dropbox.com/s/7oyuzoqonumm8 ... .capx?dl=0

  • SimoneT

    You are AMAZING! Thank you so much (again hehe). I appreciate your help more than you could know! I did think about pm'ing you, but I didn't want to be "that girl" -- you know, the creepy one that forum stalks lol. If you don't mind though, I might just do that in the future

    I looked at your CAPX, and it covers my question perfectly. I am going to use this (while going back through and reading through the manual, take my notes, etc... like I am a student all over again) so I can come to a complete understanding of everything that I have learned-and not learned-so far, especially about arrays.

    It might be a few days before I post again, since I am studying the manual before proceeding, but I will let you know how things are going! Thank you again, so much. If I could hug you through my computer I would!

  • KHC

    That's great! Glad it worked out for you. Again, I'll be glad to help if I can on future bumps in the road. Btw, always leave the artwork for the end (it's fun, the best part for me, but sometimes a total waste of energy if your game happens to change direction whilst programming), and make lots of comments or notes about your work (it's easy to get lost in your events). And never be afraid to ask for help!

    Till next time,

    Happy game designing!

  • SimoneT

    Hi again! I wanted to drop in and give a little update (and yes, ask for help.. again . I wanted to PM you, but I don't have enough reputation points so here I am)

    I spent a lot of time reading through the manual and tutorials, taking notes, etc. I played around (alot) with the memory match portion of my game but took a small break to work on the menus and other mini-games within the game. So, now I am back to the memory portion and need your advice.

    The decks that you created with the arrays are exactly what I am looking for, but the current issue that I am running into is the number of matches and number of turns keeps resetting after each "deck" is used. I have tried to figure out how to get the matches to stay consistent and keep adding to each-right now when there are say 8 matches, the layout restarts and txtMatches returns to 0 instead of staying at 8 and continuing on with the next deck (so with 3 rotations of 16 cards, there will be a total of 24 matches-then the game will end with the final message)

    I am assuming (though very blindly, and probably very wrongly) that the area that I need to change is the gMatches=gNumberCards/2. My problem is, I don't know if I am supposed to do a system action, or an action with the array itself (like sorting through each deck, and when the last deck is used the game is over type of thing).

    I tried to do a for each but it caused issues (though I may have placed it in the wrong place in the event sheet). I have searched all over, and maybe I am not thinking of the correct terms to search, but I cannot find anything about how to keep score the score going (I have found tons about saving high scores, but my issues is simply carrying the score through each deck until each deck is used).

    I hope this makes sense, if not, let me know. Thanks so much.

  • KHC

    Glad to hear from you and that your game is coming along!

    It seems to me that all you need to do is add a global variable to your game (gTotalMatches), and when a match is made, you add one to that variable at the same time you add to gMatches, or at the end of a deck, when gMatches=gNumberCards add gMatches to gTotalMatches.

  • SimoneT

    Hello

    First off, thank you for your time, you are just so awesome!

    I went through the event sheet and tried to make the changes as you stated above (along with some other changes). Every time it goes to the next "deck" the score starts over.

    I am assuming the problem is the On Start of Layout> Set gMatches to 0 that is affecting the score, as every time a new deck is shown the layout is restarted (at the end it does say restart layout) and the score is reset.

    I have tried altering the Set gMatches to 0, deleting it, changing it all together and a few more things, but any time I do anything to the Set gMatches, it allows me to make 4 matches, then it flies through the rest of the decks without allowing me to select anything.

    I also found, that as I try to "remake" the memory match game-following the tutorial, it won't always work. Last week I followed the tutorial 4 times before it would work for me. I am wondering if it is just because I don't have the full version yet, if it is what is causing some of these issues? I plan on upgrading soon, once life stops throwing everything my way.

    Well anyway, thank you for your time again. I really do appreciate it!

  • KHC

    If I am not mistaken, in the tutorial, there is a "Reset global variables" in the start of layout, which I took out in my example, as well as other things I just can remember right now... One thing I am sure, you should be able to make this game within the free version, maybe just a little different.

    You need gMatches to set back to 0, that is what determines if you have finished a deck or not. That is why I suggested you add gTotalMatches. Make sure that gTotalMatches does not reset at start of layout like gMatches does and make sure. I'll try to make a better simplified capx for you if I have time. I hope you can figure it out before then.

  • SimoneT

    Thank you for your response. I figured I was wrong with the whole gMatches thing... I just wasn't 100% sure. I am going to go back in today and play around with the event sheet, and see if I can figure this out (I really want the aha moment!!!)

    I am going to try what you have suggested again (thank you for clarifying in your most recent reply as well, I know I'll understand all this eventually, but I guess it is not completely clear yet). I will work with the gTotalMatches variable and see what I can do with it, I am assuming I just missed something, or just didn't put it in right.

    Thanks again SimoneT, I will update as soon as I can (and hopefully this time it is with the good news that I actually figured it out and that this program is really clicking with meh brain).

    Update: AHA! Okay, so I got it working where the score and the number of turns continues on until all of the decks have been used, and gives the final message at the end (then gives the player the option to go to the next layout).

    Now the only thing I notice is - each time the layout restarts, the matches and turns starts as a 0 and as soon as I make a match/play a turn the matches/turns will show the correct number (to clarify: when one deck is complete I have 8 matches 8 turns, when I go to the next deck/layout both matches and turns show 0 until I make a match/take a turn then the number goes to 9 and so on. So, I just need to find where to change this. I'll let you know how it goes.

    ps. I am so happy and excited, I could just hug you!

    99Instances2Go

    Thank you for your example of the game. It is similar to what I was trying to accomplish. I do absolutely LOVE how the cards, when paired, sit at an angle, I think that is so much fun and would give the child the opportunity to look at the images/words for a much longer period of time. Thank you, again! If you don't mind, I just might use something similar to this effect.. it is a really REALLY neat idea

  • Is this what you tri to do ?

    https://drive.google.com/open?id=0B1SSu ... HFhenRybE0

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