Calling C2 masters.. <- Added better screenshot!

0 favourites
  • 6 posts
From the Asset Store
Customize the animation of character when item changed
  • Ok bad subject name, sorry about that.

    I have been trying hard with this one.

    Once in a while maybe 1 out of 20 times, the fade out would finish but not execute line 94 (and its childrens).

    I have tried many things. Added "on fadeout finished", changed the number of TileSprite.count to 3 and some other things.

    But the problem still persists. Line 96 won't be executed. As said, once in a while only. Mostly often it works well!

    95 and 96 aren't the problem because 94 won't even be touched, I have verified that by adding browser.log msg.

    I suspect it might be something else.

    What do you think?

  • helena

    well, hard to say without seeing more of the code, but if the event isn't running then the tile count isn't getting down low enough to trigger it.

    which would indicate the timer is never getting started for one or more tiles. The most likely cause of that would be a glitch in your RandomTileArray, or a problem with the overlapping, or a tile not where it is supposed to be.

  • helena

    The object is called TileSprite but you are comparing Tilesprite.count

    Object names are case sensitive.

  • AllanR you are right, I forgot portions of related events. I am sorry for it. I have now made a new screenshot of basically the whole event sheet, removing just the very non relevant events.

    OddConfection I have now changed just to be sure.

  • Try Construct 3

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

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

    well, I walked through it and didn't see any smoking guns. I was remotely concerned that the camera could get to the player before the last tile timers finished their fade-in (and then the fade-in group is getting deactivated - I though that might lock a tile in a state that prevents it from being destroyed). But I ran a test, and that would not be a problem.

    I notice you set the MapArray to mapwidth+1 but the Random and Temp arrays are only mapwidth. Any chance there is a rogue tile in the data being imported?

    The only way I could get a tile to fail to fade out was if it did not pass the overlap test at event 92. If the collision map for one of the animations (on a less common tile does not have a point inside the x+16, y+16 spot you are checking, then it will not get removed. So check collision maps, and origin points - I routinely accidentally click somewhere I shouldn't and change an origin (and not notice) , or forget to make one of the animations match all the others...

    For debugging purposes, I would zoom the layout scale out so you can see the whole map at the start of the fade out group, and show a live tile count in a debug text box so you know for sure whether the tile count is not getting "less than or equal to 1" to satisfy event 94. Or if maybe some other strange combination of events is happening somewhere else (like somehow disabling the fade out group before it gets finished). The fact that it happens rarely certainly makes it harder to track down - but there always is a logical explanation.

  • AllanR Thank you for taking time for me.

    I followed your advice with the adding spritefont number counting down the tiles as they go, and the scale.

    I noticed that when it won't work it could be 6 to 20 tiles left and sometimes one of these tiles would be way off on X (but still within the 32 px increments) all had proper even 32 pixel positions.

    I then tried to figure out why I added one to the Maparray width, but I could not. I removed it so it matches the other arrays.

    Then it seems to be working properly. Have tested like 30-40 times but I might need to do some more.

    So you are probably right, some rogue data got into this extra array space and caused problems.

    Hopefully this is it.

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