LBramley1996's Forum Posts

  • Cheers Ashley! Got it working now, appreciate your help.

  • I've got a couple of links which are working when I test on my laptop but when I do a remote preview on my iPhone they don't work at all.

    The links are just to a Facebook and Instagram page and should work but I can't figure out why they work on the laptop and not my phone. I tested on a friend's phone and they didn't work on his either so this one has got me stumped.

    Any ideas on what I can do here?

  • OK thanks very much - I'll have a play around with probability tables. They don't look too difficult :)

  • Thanks I'll try floor(random(1,6)) and see what happens.

    I'm using the same ball and one global variable and trying to randomise the power ups this way. Should I be using advanced random for this?

  • No problem! :)

    Sorry to be a pain, I have another query now I'm wondering if you could help with. I have power ups (which give the player an advantage against red balls) and 'power downs' (which make the game more difficult for the player). I have 5 of each and they're activated for 10 secs when a player collides with specific balls. I'm currently using a global variable number to represent each power up/down and on collision with the balls setting the variable to round(random(1,5)) but it's not very effective as I'm finding that a lot of the same power ups/downs are appearing too often compared to others. E.g. The player collides with the power up ball and will get the same power up 3 times in a row - this is not what I want. The occasional repeat is fine but it's happening way too much currently.

    How can I make it so that the power ups are more randomised?

  • Yeah you're right - it was creating the object at 0,0 so I used Touch.XAt(1), Touch.YAt(1) which created the object at the X & Y of the second touch.

    Cheers for your help guys! :)

  • Thanks Oosyrag! It's working now :D

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The user will already be touching the device as I'm using drag and drop to move the player.

    How do I set it so that the bomb is dropped on a second touch and not the current one?

  • That works great - thanks! Do you know how I would set it so that only the red balls within a radius of 100 are destroyed? At the moment it's destroying all of them even if they are the opposite end of the screen.

    Do you know how I would drop the bomb to where the player touches? I'm using drag and drop to move the player so it's dropping it straight away at the X and Y of the player.

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