"Ghost" Sprites? Bug?

0 favourites
  • 7 posts
From the Asset Store
Match same tiles with each other as fast as you can and earn more score during a limited time!
  • Hi everyone

    I've come along a bug as I think, but cant explain where it comes from. I have the situation, that there is a set of squares, that can be changen to different "styles" when clickin on them. after the click a popup appears with 4 different selections. the problem is, that 2 selections are always clickable (red squares), even if the sprites dont excist (checked with debugger). i've attached some screenshots and the capx.

    I know my explanation of the problem is a bit confusing but I dont know how to describe it better. just try it out

    C2 Build: R181 (beta)

    OS: W7 64bit

    If this is just a silly beginners problem then i would appreciate tips on solving the problem.

    Thx

  • I don't understand the issue..

    You are spawning the red squares, but not destroying them, so they will remain..

    Maybe I just don't understand what you are trying to do..

    The red squares don't seem to have any function, so I'm not sure why you are spawning them..

  • The red square are just spawned to mark the spots where the big squares change to blue or green if you click on them although the selection is not up. the problem is that when clicking on that spot it changes even if the selection is not there and it seems that from the beginning on those spots are there.

    little example:

    1. i start the game

    2. i click on a spot where later on will appear the red squares

    3. the big square changes to green/blue without showing the selection

    issues:

    1. the selection was not set there yet

    2. squares can be changed without selection

    ...hope that helps to understand.

  • It seems like you are spawning the selection on layer 2 (which doesn't exist)..

    On created it spawns the blue squares on layer zero and on blue squares clicked selection is destroyed along with the blue squares..

    so without seeing the things actually happening (for they happen all in one tick) they are created and destroyed, it would otherwise be impossible for the red squares to be spawned..

  • ah ok.... i think i undestood it. is there a possibility to change that, so that the selection appears and a 2nd click is needed? didnt expect that with that one click it would activate both actions.

  • C2 reads events top to bottom, so when one event is executed the next event will trigger within the same tick if the conditions are met..

    Adding a wait action before creating the blue squares might help..

    Other options would include adding more conditions and or even timer behaviour..

    You might even get away with just adjusting the order of events..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ok thx for the hints. with adding a 0.1sec wait before creating the blue squares solved the issue

    thx a lot

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)