How do I fix this strange problem / bug after reloadedlayout

Get help using Construct 2

Post » Sat Jan 31, 2015 7:18 pm

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.
B
19
S
5
Posts: 104
Reputation: 1,761

Post » Sun Feb 01, 2015 8:44 am

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
B
19
S
5
Posts: 104
Reputation: 1,761

Post » Sun Feb 01, 2015 9:10 am

I'd recommend including a .capx; we don't know what your "load game" does.
B
11
S
4
Posts: 152
Reputation: 1,236

Post » Sun Feb 01, 2015 9:24 am

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...
B
19
S
5
Posts: 104
Reputation: 1,761

Post » Sun Feb 01, 2015 9:31 am

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.
B
11
S
4
Posts: 152
Reputation: 1,236

Post » Sun Feb 01, 2015 4:28 pm

[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.
ImageImageImageImage
B
62
S
19
G
51
Posts: 633
Reputation: 30,836

Post » Sun Feb 01, 2015 6:14 pm

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
B
19
S
5
Posts: 104
Reputation: 1,761

Post » Sun Feb 01, 2015 8:18 pm

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 ?
B
19
S
5
Posts: 104
Reputation: 1,761

Post » Sun Feb 01, 2015 9:48 pm

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.
B
11
S
4
Posts: 152
Reputation: 1,236

Post » Sun Feb 01, 2015 11:03 pm

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.
B
19
S
5
Posts: 104
Reputation: 1,761


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 19 guests