How do I fix this strange problem / bug after reloadedlayout

0 favourites
  • 10 posts
From the Asset Store
Strange factory themed set of tiles for your platformer game
  • hello all !

    http://imgur.com/w5qVGZY

    here is what happens when the mob die. : he explode into 4 parts, which stays on layout until the end.

    the first time i play the layout, eeverything works fine.

    but if i die, go to the menu, then restart layout trough LOAD GAME: this time when a mob die: all the "mob parts" are affected, so they all end up is animation frame 3, and move again because of the set bullet speed order on the first part.

    why ? how can i do to fix that ??? thanks for your help.

  • bump .

    there is no reason construct do that in my coding. maybe a c2 bug ?

    maybe i should use another way to achieve the same result ?

    anyone have an idea ?

    thx

  • I'd recommend including a .capx; we don't know what your "load game" does.

  • it just reset a few golbal variable. but basically nothing related to this objects.

    consider its the same layout played a second time, nothing more.

    i dont know why c2 react that way.

    the capx is very heavy, and the project is big,

    if you cant help me without capx, i'll try to reproduce that in a lighter capx...

  • Sometimes trying to reproduce it in a lighter capx is a good way to find where the problem is. I recommend saving as a different .capx, then removing elements until the problem doesn't occur.

    I don't think Restarting the layout reset global variables. You might want to double-check that- I saw "gameRunning" listed in your screenshot.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • [quote:3btssl8y][I don't think Restarting the layout reset global variable That is correct. Restarting the layout does not touch global or local variables. The action to reset global variables does not touch local variables.

  • before restarting the layout i go through another layout where some global variables are saved and others are reseted. then the layout is restarted.

    thats was an anwser to "we don't know what your "load game" does." from unnatural.

    apart from that there is no other thing touched that differ from a simple restart layout order.

    so i still see no reason why this particular event : http://imgur.com/w5qVGZY react differently the second time

    edit: i read somewhere that when an object is created, the following order are automatically set to it when it concern the same object.

    but , i dont know why, the second time, the order process all instance of the object and are not restricted to the object just created... WHY ?

    thx

  • i runned more test.

    level1

    the first time i play the layout, everything is fine.

    i die , retry . the bug is here. i die, retry . its gone. (and dont seem to come back)

    level1

    first time ok > goto lvl2 > ok

    i die : go back lvl1 > bug is here, die, retry, bug is gone (and dont seem to come back)

    level 1 ok > level2 ok >level 3 ok

    i die: checkpoint lvl3 > goto lvl3 >bug is here. die, retry , bug is gone (and dont seem to come back)

    i'd really appreciate some help on this..

    maybe i should done something with UID to avoid that ? but i dont know really how to use it.

    or maybe use a different organisation in my events ?

  • You could put the .capx up onto a https://www.dropbox.com/ account, if you would like anyone to look at it- I don't think anyone is going to be able to help you without looking at the file. Did you have any luck trying to recreate the problem in a lighter-weight file?

    Note- large backgrounds and music tend to make up the largest part of a file.

  • its totally uncomprehensible, but i let this problem aside. work on others things, and now the problem has disappeared.

    soooo. i dont know what to said.

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