ultrafop's Recent Forum Activity

  • Here you go: https://www.dropbox.com/s/xrvnfbjy48v5h ... .capx?dl=0

    I commented on the section that needed to be changed. Also, I love the animation you have. Is that from something or did you do that yourself?

  • I also love this. I was literally wondering how to play test this haha. And how the heck are you getting that shake effect lol?

  • Yeah, that's exactly what I mean. I was thinking of the issue as sprites being too small to accurately touch on a touch screen device. If you want to increase the interactive area of a sprite but it's going to be colliding with other spites (a touchable game object, rather than a button) there are two ways to do that I can think of. The first is what you mentioned in your OP, adding a touchable object to the sprite that sets it's position to that sprite (Also, keep it in a container to help with picking and spawning). The other is to increase the bounding box size and use multiple image points and overlapping at offset to determine your collisions and set your events.

    If I'm still not understanding please let me know. Also, if this isn't helpful I might need a bit more info on what the purpose of the sprite is to think of a solution.

  • I'm not sure whether you actually still need help with this? You could just increase the actual size of the object without changing the size of the sprite, and just make sure your collision box is made to be as large as possible.

  • Thank you for all your help! This is way more complicated than I thought It would be.... Is there no way to use the local storage to save the gem value they obtain (as it would always be different) and then ask it to pull up that value when the final score layout plays?

    I'm a bit confused but I think I know what you mean.

    So if you aren't concerned with saving gem values between playthroughs (i.e. they are set to 0 each time you play) then you don't need local storage. The arrays are global so they will have persistent values between layouts. That means you don't need anything fancy to set text from the array.

    However, if you want to save your array values and have them return when you play again, you'll want to use the Local Storage object. Local Storage loads asynchronously, so loading from it on the start of the layout you're hoping to use it's data for isn't always going to get you the desired result. Instead what you'd probably want to do is have your Local Storage load values into your array when the game first starts, and save those values at the end of your levels (for example, I'm not sure when would be best to update variables in your project, specifically). That way the array is ready by the time you get playing and can be updated without touching the Local Storage object. The Local Storage would only be used to get the array primed for play.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you that does help! So, for this case the math concept would be the x value and the gem number would be the y value? But since that number is changing and always different, how can I set that value?

    Good question! You would want to determine where your math concepts would be (e.g. array.at(0,0) = Multiplication, Array.at(1,0) = Division). There are ways to do this on the fly but for the sake of argument, we'll assume you have everything predetermined in terms of X location (with a Y value of 0). Then all you're doing is updating Y=1 at those X locations (e.g. set value array.at(0,1) to 20. This would mean you have 20 gems for multiplication). You can save and load this data between play sessions using the local storage object. I hope that helps!

  • Hey all!

    I'm wondering if anyone has a method for using object blend modes (destination out and atop specifically) with the paster object? I have a bunch of textures I've made I'd like to drop on top of platforms but I'm hitting a snag pasting objects and/or layers into the paster object with things blended.

    Any help would be greatly appreciated!!

    EDIT: Okay, I had read up on how to get this working before this post but I must have been up too long because I was thinking off the paster object as something I couldn't have unique instances of (e.g. just a bunch of one paster object with different blend modes). Everything is working well with blend modes now! Woo!

  • Hey! Glad that helped! Absolutely. Here is a capx with comments to explain how to pick by UID with functions. I also demonstrate the use of functions to create new objects without overlapping. I've also added a challenge in the capx using and array to pick UIDs to be deleted, as that may be helpful in the future.

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

  • Thank you!!! And forgive me, i'm not quite sure how that all works.

    so for example I have "Global number GEM=0" at the top of the event sheet. Then, for example, I have player on collision with gem<system add 1 to gem. I also have on collision with bat and platform is falling<system add 2 to gem. So, all are going to one gem value. I'm newer to this so thank you for your time!!!!

    Oh it's really my pleasure. As for using arrays and local storage, I think tutorials would probably be more helpful in teaching you how they work than anything I could write.

    1) https://www.scirra.com/tutorials/307/ar ... -beginners

    ---- This one is great and has capx's included so you can see what's going on if you feel like you aren't getting the results you'd like.

    2) https://www.scirra.com/tutorials/1461/h ... age-plugin

    ----- This tut on Localstorage also has a capx included.

    Please let me know if you need more help after looking at these tutorials

  • I’d put your text objects and boxes in a container. I’d also use a function to pick your squares to be deleted by UID (this will help with picking). When the square is deleted its corresponding text object should also be deleted since they would be in a container.

  • Oh yeah! I had one black box for the bullet and one for the game over screen background! Thanks! Last thing, if I wanted to reset the score when it starts a new game, could I just use Set text to "Current Score 0" every time it clicks the start game button?

    For sure. Just set score to 0 on your main menu (assuming you will be directed there after your score page) at start of layout. That way the score works correctly when you begin your next game.

  • Hey! In the new screenshot sprite 6 does not appear to be in the layout (but looks similar to sprite 4, which is there), so the score would not be updated because it is never struck by the laser. This is assuming that the objects on the right in your picture are for the same layout as your screenshot. To make things easier to keep track of, I'd name your sprites something unique so that they can't get confused with one another.

    Hope that fixes things!

ultrafop's avatar

ultrafop

Member since 26 Jul, 2015

Twitter
ultrafop has 1 followers

Connect with ultrafop

Trophy Case

  • 9-Year Club

Progress

9/44
How to earn trophies