Please Help! Repetitive Audio Event - How do I

  • That looks fine. You probs have some other objects around that are not overlapping Sprite3. Load in debug/preview mode and see what the value of numpips is and check it matches how many objects you are expecting.

  • plinkie I have changed it to "on collision with" instead of overlapping, and even if all sprites of the family are touching the goal object, it still now working, it doesnt go to next layout :^(

  • Your logic is correct, you'll have to debug it. Do you have the original object somewhere off layout? You'll need to destroy that at the start. Check out what numpips is saying.

  • plinkie So i noticed with the debugger that the numPips count is adding up everytime I reload the game, never returning to the correct count... Thats probably a hint for an error, but I cant think of it... Also there are no other Pip Sprites around or outside the layout...

    maybe some "every tick" condition to keep the sprite count correct?

    I added an event for every "sprite family" destroy, substract 1 from the sprite count (numPip) but still when the layout reloads, its not returning to the original count

    EDIT: alright I fixed the count by stating that every start of layout the global variable should be reset.. is that correct?

    But still my main objective is not working

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I gotta sleep now, probably move this to PM or it'll go on forever Message me with a link to the capx or something and I can debug it for you later. If you're switching between layouts then yes it should be reset for that type of logic, I was just talking from the most basic sense.

  • Thanks a lot plinkie i gotta go too

    I will be very glad if you can help later on PM, I thought this would be simpler but its always bugging.... I added an event that says "when sprite is outside layout, substract 1 from numPips (sprite count) and on the debugger when the sprite goes outside the layout, the number keeps adding up non-stop! its not substracting just once, it keeps goin' !

    good night!

  • plinkie ! I cannot PM because: disabled the sending of Private Messages until you have earnt 500 rep.

    Please check this example:

    So that basically what im trying to do, but that was just created to send to you. Can you make the game go to next layout when ALL sprites are touching the floor? I added the global variable to count sprites, but its counting crazy, keeps adding up...

  • Yeah in my original example I had the calculation for total sprites on start of layout only, so it does it once. You have it doing it continuously every tick. You need to put the add to sprite count at start of layout or under a trigger once while true event. You also can't use on collision with because that is checking when they first hit the sprite, you want when they have all landed so it's better to use overlap at offset for this. ... nkie2.capx

  • Sorry plinkie I couldnt open the file because im using an older version of C2... Can you send me print screen of the Event Sheet? Thank a lot

  • plinkie you are the best, this community is the best ;^)

    thank a lot for all the help

  • np you're welcome.

  • Hello plinkie ! I still cannot PM you..

    if you have some time, could you help me out with another issue?

    When the green box touches another green box, it spawns a white one, but if it fall straight horizontally into another green box, it will spawn 2 boxes instead of only one white box... Can you solve this?

    If yes, can you send me a print screen of the event sheet?

    thank you very much

  • You didn't specify where to spawn the white box so it spawns a white box on all of the green boxes. You can use Pick nth instance to specify which object you want to use when an overlap or collision occurs, one will be instance 0 the other will be instance 1. Try this :

  • That's really interesting, thank a lot, gonna fix it

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