indy2005's Forum Posts

  • It never exits the loop....you can see in my screenshot the two variables are both 3. This should make the WHILE condition false. Infinite loop however...maybe it’s a bug when using an inverted condition (logical Not).

  • I am randomising positions until nothing overlaps. I am spawning an object, increasing a counter. I am then checking if any instances overlap, if they do...I destroy the object and decrease the counter. This repeats until the counter reaches the desired value (required instances). My understanding of While is, it leaves the loop when the condition inside the loop is False. My IF statement comparing the variables should evaluate to false when the number of instances matches the required number of instances. I can see from the debugger, they are equal (3), so the criteria (System get value) should evaluate to false and leave the While loop.

  • Although my inverted condition should be returning false, as the global variables now match, I never leave the damn WHILE loop?!

  • Without a loop, how do I keep creating objects until the right number are created, and none overlap?

  • I am randomising the location of playing cards, and I dont want them to overlap. I tried a WHILE loop to keep selecting random positions until there is no overlap, but it just hangs. I am trying to check of a sprite overlaps with another instance of itself (PlayingCard)

    Update, OK I realised I was setting the variable at the top of the WHILE loop, hence it was hanging. I am trying a different approach as below, by destroying sprites until there is no overlap, but it still isnt working, I am getting sprites overlapping each other. When I debug, I can clearly see PlayingCard overlapping with PlayerCard, but the is overlapping test never seems to get triggered. Is this related to instances trying to detect if they overlap with themselves? Does that not trigger?

  • Hi

    I have a vertically scrolling game, and I am using a Drawing Canvas on its own layer to draw lines based on TouchX and TouchY. It seems when my game scrolls upwards, I obviously need to keep the drawing canvas overlaid on top of the viewport, as my game currently scrolls beyond the drawing canvas and the drawing gets clipped.

    I have tried turning off parallax, so it just remains in place, but this doesn't work either.

    What is the approach to maintain the drawing canvas overlaid over the viewport, and still be able to interpret touch coordinates etc.

    I think the answer is to turn off parallax on the drawing canvas, but use the ViewPortTop value somehow to manipulate any Touch Y co-ordinates. I am assuming Touch.X and Touch.Y are physical device co-ordinates (viewport) - or are they world X-Y coords?

    Regards

    SM

  • Great thanks!!!

  • Hi

    I have 3 disc sprites. As they move around I need to ensure the camera is zoomed in such a way to ensure all 3 are always on screen.

    Any advice appreciated, or links to existing examples.

    Thanks

    SM

  • Hi

    Yes thanks. Couple of Boolean to check the initial collision - and then the end of the collision means it passed all the way through.

    Regards

    SM

  • Lol, I was disabling collisions on start of layout

  • Hi

    My disc is physics Xs based. I created a sprite square without physics, and am stretching it between the 2 discs at the required angle. The issue is, my ‘is overlapping’ isn’t firing?! Is it because one is physics based and one isnt? Does stepping and bullet work between physics and non physics?

    Thanks

    SM

  • Sorry, bad image...

  • Hi##

    I need to check that a disc has crossed over the barrier which I am srawing using the canvas between 2 other discs, and am not sure how to achieve this?

    I dynamically draw the barrier across the 2 discs with the larger Y values out of the 3 discs, and the user has to get the disc between the other 2 discs, without touching them.

    Any advice appreciated.

    SM

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi

    Thanks. Yes it was colliding with the tiles above and below. Many thanks 🙏

    Regards

    Stephen