LBramley1996's Recent Forum Activity

  • I'm creating a game where the player has to avoid red balls for as long as possible. The red balls are flying around the screen in random directions and to do this, I've used the bullet and wrap behaviours.

    One of the power-ups in my game is a magnetic bomb. What I want to do is when the player collects that, they can drop the bomb with a second touch and red balls are attracted to it as it's magnetic. After a few seconds and when multiple red balls are surrounding it, it will explode and destroy them.

    I've set the red balls' angle of motion to the bomb when it's created but I don't know how to do the following:

    1. When the player gets the power-up, use a second touch to drop the bomb anywhere on screen.

    2. When red balls get to the bomb, I want them to hover around it until the timer finishes and it explodes. At the moment, they fly away from the bomb after a second or so, how would I get them to remain within 100 pixels of the X and Y of the bomb?

    I've attached an image to show what I'm trying to achieve here.

  • Turns out elsewhere in the events on player destroyed I had it setting score.

    Thanks for this - I wouldn't have thought to check if you hadn't have said that.

    Cheers!

  • I'm still not having any luck with this. What I've done is:

    deleted 'on player destroyed', so the event is now score > high score - set item 'score' to score & set high score to score.

    I just tested this but it didn't work. For some reason the game remembers the high score correctly for around 3 games then after this it just resets for some reason, any ideas where I'm going wrong?

  • Can anybody tell me where I'm going wrong with my high score events? I've followed a couple of tutorials but I'm having issues as it sets the high score but then after a few times of playing, it's like it forgets it and so resets. So, for instance, if my high score was 10, it would set this and I'd play a few games and at the end of the third or fourth game, if I'd only got 5 points it would set the high score to 5 rather than remembering it's 10.

    I've used the persist behaviour on the text objects but this hasn't made a difference.

    Been stuck with this a while so would be great to get some advice on it.

  • Cheers for your help guys - I've managed to get it working right by using distance from the centre. Really appreciate it!

  • What should I use as the start and end indexes?

  • I'm creating a test of a game whereby the user must hold down a button which will shoot a ball and they must hold the button for the right amount of time so they get the ball to land on the target. The scores are as follows:

    Green circle - 2 points

    Yellow circle - 5 points

    Red circle - 10 points

    What I'm currently doing in the events is comparing which object the ball is overlapping to determine how many points are added to the score variable. However, when the ball is over the red circle for instance, it's adding 17 to score as it's also overlapping the other two circles.

    Is there a way to get around this?

  • Thanks a lot for your help guys - it works perfectly! Really appreciate it :)

  • The current code I've tried doesn't work at all so it's probably not much use to send over.

    It's to be used in the game layout. Basically, I have 3 different power-ups within the game that the user can get and when they do, I want text to appear and show in big writing the exact power-up they have earned. I've just used text so far as I'd hoped I could do this and set the text dependant on what power-up the user has just acquired, can it not be done using a text object?

  • I'm trying to figure out how to tween text size once it's created. The starting font size is 20 and I want to tween this up to 60, what's the best way to do this?

  • Got it working now, thanks!!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • In the game, the user earns coins and I have used the local storage plugin to store the number of coins earned by the player. These are then spent on different things in the game but when coins are spent and the player returns to the home screen which displays the number of coins they have, it goes back to the original value. So, basically, I cannot subtract from the coins which I need to do.

    E.g. The user accumulates 200 coins and spends 100. The coins should then show 100 left but it still shows 200. I think it's because I'm setting the value of coins to LocalStorage.ItemValue so it's pulling the previous value and ignoring the subtraction.

    Any ideas how this can be solved?

LBramley1996's avatar

LBramley1996

Member since 30 Jan, 2021

None one is following LBramley1996 yet!

Trophy Case

  • 3-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

6/44
How to earn trophies