ultrafop's Forum Posts

  • 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.

  • Try Construct 3

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

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

  • 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!

  • First thing I notice this that this belongs in the C2 portion of the forum (this is C2 right?). Might need a move.

    Can you please post a pic of the full code there (without those obstructions)? I notice that sprite2 (your rail/laser I assume) is doing something every tick at the top but I can't make it out to see if that's part of the issue.I'd also like some clarification of what you mean by the score not working correctly. Is it adding too much to the score variable or not at all? Have you tested it in debug mode to see whether the issue is the score not adding correctly or whether it's the text object not displaying the score? Also, assuming the value is not changing at all, I'd check to make sure your rails are not on a layer with a parallax of 0,0 (I see the HUD layer there), as it won't actually hit your walls and update the score. Just a few ideas.

    EDIT: Is your text object not displayed on the screen at all? Because that may be a parallax issue.

  • Hey, I'd put your total collected gems into an array and save/load your values using the Local Storage object. Each section (addition, subtraction etc.) can have it's own x location in your array (assuming you don't want to store multiple values for each section, in which case you could use a 3 dimensional array).

    When you want to display the values, you just set (or append) your text to the x (or x/y) location containing the value you saved.

    I hope this is helpful, but if I've misunderstood please let me know.

  • Have you made sure default controls are off for both platform objects?

  • For example, i'm making a game with a mine in it, and i want the mine too look good, something similar to this

    https://www.scirra.com/store/royalty-free-game-tilemaps/cave-mine-tileset-172

    I could just buy this but i want to make it on my own. As for the software im using, im using aesprite.

    Yo! I don't know that software but essentially you want to create scalable tilesets (32x32, 64x64,128,128 for example) where the edges match up. I'd look for info with aesprite's community on doing your own tileset, as they'd likely have the best advice in using that software.

  • Yo! Valera's plugin has an MIT license so you can use it so long as he's credited.You can't set new variables in the browser object (If I'm wrong, can someone show me how?), so you'll have a tough time with code like that. If the only issue is the time info at the end of your date you could also just make the textbox a size that cuts that part off.

  • Perhaps this is what you're looking for: https://www.scirra.com/store/construct2 ... ugins-1662