jktozier's Recent Forum Activity

  • Happy to help! Yeah the other Idle (Idle49 I think it was called?) was located way under your gameplay area, and was being called as the one to scroll to. But since it was off the screen, it couldn't complete the action. I didn't notice the fireball not working properly, it could have been related to the Idle49 as well, but once I removed that one it didn't seem to cause any issues. At any rate, it's a great sprite-based look (I'm a fan of the retro-looking titles), and I hope the project moves along for you.

  • The invisible sprite was a result of having another same-named Sprite object causing a conflict. Here is an updated .capx, with changes made and heavily commented, explaining how I achieved the animation swap result. I condensed what you had into a few groups to hopefully make it easier to navigate the event sheet. You didn't need the empty events as spacers, so this should have cleaned up the code quite a bit.

    If the comments don't explain how I did it well enough or you have other issues, let me know.

    David.capx_v2

  • Sure, let's look at a .capx and see how we can fix what you have. Just save what you have as a Single File from your export options in C2, then upload that to something like, say, dropbox. Once you have that, use the insert hyperlink button on the forums posting options. It'll first ask for a name of the file (type whatever you want), then the url for the dropbox file (just right click and copy the link to the file in dropbox, then paste it into the url request).

  • Okay, since I see you have 2 sets of animations ready, you will just need to add sub-events to your already existing movement and attack methods to take advantage of their second state. Hopefully this screencap will better explain then. Note what I have shown for the "On right arrow pressed" will need to be replicated for the other movements, attack, and jump.

    <img src="https://dl.dropboxusercontent.com/u/98084707/Help7.jpg" border="0">

    Here's a small .capx showing the states changing with the above- demonstrated method.

    SwapAnimationHelp

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • <img src="https://dl.dropboxusercontent.com/u/98084707/Help6.jpg" border="0" />

  • No problem! Basically if you have another animation attached to your squirrel in the editor that corresponds to "when the bag is full" (Run_Bag_Full) or whatever you ended up calling it, set an event that Compares the Instance Variable AcornCount >/= 10. When this is true, set animation to "BagFullWalk"/"BagFullJump"/"BagFullAttack" or whatever you chose to name them.

    <img src="https://dl.dropboxusercontent.com/u/98084707/Help5.jpg" border="0" />

    The above illustrates how you could do this if you were making another set of animations. If you were only swapping between an empty or full bag image, you would simply create another frame for your bag in the animation editor, put the bag full image as the other frame, set its animation speed to 0, then use the same method as changing animations listed above, except only change the frame of the bag to the # of the full bag frame (in this example, change from frame 0 (empty) to frame 1 (full)). Make sure you set this 2-frame bag animation's speed to 0, or else it will swap frames on its own upon loading the game, which you don't want, you want to drive that frame change with the events.

  • (It seems you were responding to this while I was typing my reply, so it appears you already knew this)

    First of all, you've done nice work so far! I wasn't able to press the Down arrow key to store the acorns at the "Home" location, but was still looking good!

    If I understand your question correctly, a simple solution would be to add a local variable to your squirrel (AcornCount for example), have that local variable increase by 1 every time it collides with an acorn sprite, then upon that local variable becoming greater than or equal to 10, change the squirrel's animation to your "loaded bag" one. From that point it would be quite simple to reverse the process by resetting that variable to 0 upon completion of a level, etc., to allow it to go back to its original "unfilled" state. This would also serve as the trigger for making the squirrel unable to jump quite as high.

    What you will have to decide, however, is artistically which method you would want to use to have the 2nd "bag full" animation. The two ideas that come to mind are simply copying all your animations a 2nd time in whatever image editor you are using and alter the bag to being full, then importing these second sets as "Walk_Full", or "Attack_Full", so that you have something to change them to when the count reaches 10.

    The second option would be to redo the animations you have currently where the bag itself is not present, then create 2 static sprites of the bag (one empty, one full). Prior to the variable being 10, have the empty bag sprite either pinned to the back of your squirrel, or have it create the empty bag sprite once, then set its location to the squirrels image point each tick. Once the variable count is equal to or greater than 10, you would only have to change the empty bag sprite to the full bag sprite and repeat its pinning or location tracking.

    Long story short for the 2 options i've suggested: make 2 sets of every animation, or modify the 1 set you have and swap out 1 image.

    Keep up the good work! (sorry for the lengthy wall of text)

  • Yeah I pointed that out before my explanation. Stef1756 must not have noticed the other section available.

  • (Moderators will likely want to move this to the "How do I" section.)

    For the purposes of this explanation I will use the free software Gimp as my image editor (since it's, well, free). If you don't already have Gimp, you can pick it up at gimp.org

    1. Open the image in Gimp. In the layers panel on the right, right click on your image layer and select the "add alpha channel" option near the bottom of the list.

    <img src="https://dl.dropboxusercontent.com/u/98084707/Help1.jpg" border="0" />

    2. Either by using the "Eraser" tool by hand, or by using the "Select by Color" Tool, remove the white background of the image, which should reveal a dark grey "checkerboard" pattern behind your image (the graphical representation of transparent pixels). (I would recommend using a brush with a hardness of 100 if you are using the Eraser tool. Change the hardness of the brush in the Tool Options panel on the left)

    <img src="https://dl.dropboxusercontent.com/u/98084707/Help2.jpg" border="0" />

    3. Once the background is removed, select the "Export" option under "File", change the filetype to a .png, then save it to your desired location. Now when you open the Sprite in Construct 2 and place it in your work area, you will notice the white background is gone. If there are still small areas of white, this is due to not doing a perfect job during the clean up process in Gimp, simply re-open it in gimp, be more precise with the removal of the background, then repeat the process of exporting as a .png file.

    <img src="https://dl.dropboxusercontent.com/u/98084707/Help3.jpg" border="0" />

    <img src="https://dl.dropboxusercontent.com/u/98084707/Help4.jpg" border="0" />

    -Notes-

    Make sure you save your files to places where you know how to find them again.

    Make sure that if you use the Select by Color Tool and there happens to be parts of your image that are the same color as the background you are trying to remove, that you don't accidentally remove those parts too. It might be necessary to use the Eraser tool only at that point, or lower the tolerance/threshold of the Select by Color Tool.

    It might be necessary to resize the image in Gimp before exporting now that the background is gone to maximize the performance of the image in your game. If the white background added another 40 pixels on all sides of the image, even if you remove the white the size of the image will remain the same, even with transparent pixels. So crop the image closer to your actual content then export it. This will reduce file size and help performance. Also be sure to use "power of 2" sizes when at all possible. (64x64, 128x128)

  • This is probably related to the file type of your image. .jpeg images, for instance, don't save out with the alpha channel intact. You need this to preserve a clear background image. If you want to have an image with a clear background, you have to change the file type to a format such as .png, which will preserve the alpha channel (transparency). So remove the white background in your image editor of choice (ex. photoshop), then save the image as a .png (this will allow you to import the image with no white background). I hope this helps, if you run into any other problems, let me know.

  • Radiant

    kongregate.com/games/Jktozier/radiant

    300-500 Plays

    I've uploaded my first venture into Game Design onto Kongregate today, all thanks to Construct 2's ability to let Artists like myself take a crack at simplified programming. I've learned so much in a short time thanks to the tutorials and posts of this community, and I truly hope everyone enjoys playing this even slightly as much as I have enjoyed making it.

    I look forward to gaining even more experience and making more games with C2!

jktozier's avatar

jktozier

Member since 19 Dec, 2012

None one is following jktozier yet!

Trophy Case

  • 11-Year Club

Progress

11/44
How to earn trophies