Load from save and spawning objects issue

Get help using Construct 2

Post » Sat Dec 05, 2015 8:54 pm

Hello

I've encountered an issue I can't quite understand :)

I have a sprite that spawns other objects when it hits a trigger (in this case collision with another sprite). The objects that are spawned from this event are set to fly off in different directions.

Image

Starting the layout fresh gives the correct behavior.

Just before the spawn trigger I have another trigger that saves the game.

Loading from save will now make all the objects spawn, but now they all fly off in the same direction.

Image

Restarting the layout makes everything run right again - now even loading from save will give the correct behavior.

What am I missing here? Is there something I'm not treating right using the load/save commands?

Here are my events:
Image

here's a link to the capx:
http://s000.tinyupload.com/index.php?file_id=74115206719692117210

Thanks!
B
8
S
2
Posts: 28
Reputation: 546

Post » Tue Dec 08, 2015 7:14 pm

bump

Any ideas?
B
8
S
2
Posts: 28
Reputation: 546

Post » Tue Dec 08, 2015 8:38 pm

I can't really help, but what I think what happens is that after the load the value of the number of repeats isn't set correctly. It seems it is set to one, because only one sprite is spawned. If you wait to save after all sprites are spawned it works correctly. With signal you can delay the save as long the loop has not finished.

Image

Maybe it's a bug that loop repeats are not stored correctly, you should ask Ashley.
B
23
S
3
G
1
Posts: 412
Reputation: 2,062

Post » Wed Dec 09, 2015 8:45 pm

Thanks for this! I guess it could be a deeper issue after all.. I'll bring it over as a potential bug.
B
8
S
2
Posts: 28
Reputation: 546


Return to How do I....?

Who is online

Users browsing this forum: blackhornet, RetroSpock and 14 guests