jeffige's Forum Posts

  • I'm working on game achievements, and hopefully the logic will carry over to the store.

    When the player's ball collides with a star, 1 is added to the GV StarCount. When the StarCount is greater/equal at certain levels the player gets an achievement, and a certain number of shields is added to the GV Shields: starcount = 250 - 1 shield, starcount = 500 - 2 shields, etc. etc...

    How can i make the ball spawn a shield only once for every point the GV Shields has?

    And wouldn't I need to set the Shields to localstorage?

    Thank you for any help with this. It's been turning my brain to mush.

  • Thanks for the replies.

  • My disks have bullet behavior. When they are created offscreen (above/below viewport) they move at 90/180 degrees.

    With the help of 99Instances2Go in my older post https://www.scirra.com/forum/viewtopic.php?f=147&t=183022&p=1074558#p1074558 I got the ball to move in the dirrection with the disk that it is sitting on top of.

    But now, I have added a rotation to the disks. The disks that move at bullet angle of motion - 90 degrees rotate clockwise, and the disks that move at bullet angle of motion - 180 degrees rotate counter-clockwise.

    How can i get the ball to rotate along with and in the direction of the disk that it is currently on top of? Keeping in mind the ball has to roll from disk to disk. I've tried pinning the ball to the disk if there is no gamma input, but that didn't work. Tried rotation, but that only rotates the ball.

    Any help with this is greatly appreciated.

  • thanks for the help, but i decided that adding the Gold star was a bit too much and detracted from the gameplay.

  • Experience comes with time. Sometimes i'll start an empty project and spend a few minutes with a behavior or two.

  • I'm trying to get a spritefont+ box to flash if the player gets a new high score. Adding the flash behavior does not work.

    Any help is greatly appreciated.

  • Sine Behavior

  • This is how i did it --

    Global Variable Timer.capx

  • Thanks for the reply

    I have no experience with the Nth instance expression, but i'll check it out.

    Again, thanks for the reply.

  • kaveljo Paradox Thanks for the replies. Let me try to explain a bit better.

    I have 6 disks in the AllDisks Family --

    Small, Medium, Large that have bullet behavior and move with - bullet angle of motion 90 degrees. They are created out of sight just above the viewport every random(1,2)secs and move from top to bottom, where they are destroyed outside of layout.

    Small, Medium, Large that have bullet behavior and move with - bullet angle of motion 180 degrees. They are created out of sight just below the viewport every random(1,2)secs and move from bottom to top, where they are destroyed outside of layout.

    Each separate disk has its own event/action, since they each move at their own random speed, and are created at different intervals, as seen in the example image.

    For each AllDisks that is created, it spawns a single StarBlue.

    The user has to roll a ball around over the disks without falling off the edges and collect as many of the StarBlue as they can. On collision with the ball, each StarBlue is destroyed and counted.

    I'm trying to make it so that when the user has collected/destroyed a random number of StarBlue, a single StarGold is created/spawned on just 1 random AllDisks.

    For example: StarCount is equal/ greater than 100 > System choose(a random disk from the AllDisk family) - spawn 1 StarGold -- StarGold pin to the AllDisk that was created at image point 0.

    Or something like that. So, basically i need 1 StarGold to be created when the user has collected between 50-100 StarBlue. And have that StarGold be pinned to a random disk.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The alldisks are created every random (1, 2) secs above and below the viewport and move at 90 or 180 degrees. . As you can see from the image, a starblue is spawned for every alldisk that is created. All that works correctly.

    For each starblue that is destroyed 1 is added to a globalvariable named StarBluecount.

    I'm trying to get it so that when random(50, 100) starblue is destroyed, it, or an a alldisks spawns a single stargold.

    I've tried using variations of event/actions to get the starblue or the alldisks to spawn the object, but no luck. The starblue will either not spawn anything or spawn a stargold for each starblue that is created. And the alldisks will either spawn all blue or gold.

    Been working on this for about 6 hours now, and the posts/ tutorials aren't close to what i need to do. If anyone can school me, it would be greatly appreciated.

  • blackhornet thanks for the reply. And a huge thank you for your GYFM!

  • So i got the high score localstorage logic down, and I've been trying to learn about saving top 10 high scores. Reading and watching tutorials on the subject, most are over 2 years old, some are using the webstorage and others are using the localstorage.

    The posts/tutorials i've seen either have deadlinks or only describe saving a single high score, while either using webstorage or local.

    Which is best to use for a local top 10 high score and eventually a leaderboard on google play?

    Thanks for any help with this.

  • Thanks for the replies.

    It took a lot of trial and error but i got it...finally - angle(X2_135.X, X2_135.Y, LayoutWidth/2, LayoutHeight/2)

    Although i read posts, tutorials, watch videos, it takes me a bit of time to comprehend things. That's just how my brain works. Sorry i'm not as quick as some of you guys.

    Again, thanks for the help. Very much appreciated.

  • Check your image point on every single frame. Sometimes when i insert an animation, mostly explosions, the image point is off by a few pixels. Even if you use the image point > bottom or whatever, it can be off because of your frame.

    Try slowing down the whole animation, 1 or 2 seconds, and then slow down each frame also. Run it. Watch the animation. I've spent a bit of time trying to get it exactly right at times.

    Save your project before you attempt this, but not during. So you can go back to the original in case things get too far off.