Reset persist behavior

Get help using Construct 2

Post » Sat Feb 15, 2014 11:08 am

Hi!

I have a mario-like platformer and the player can collect coins from levels. I solved the problem of the coins re-spawning after entering rooms (other layouts) by giving the coins the persist behavior. But now I can't figure out how I can reset the coin positions after game over.

In other words, how do I force items that have persist behavior to reset?
B
9
S
1
Posts: 97
Reputation: 715

Post » Sat Feb 15, 2014 12:43 pm

If you've placed them manually in the level, won't they reappear where you placed them?

B
6
S
2
Posts: 62
Reputation: 628

Post » Sat Feb 15, 2014 2:24 pm

Yes I have placed them manually.

They won't reappear because of the persistent behaviour. This is what I want when the player visits other layouts like shops, because the collected coins should not re-spawn simply after the player has visited a shop. But when I try to restart the layout from the Game Over screen (also resetting all global variables at the same time) the coins that the player collected are still gone. I would like to have the collected coins re-appear if the player restarts the game at the game over -screen.neutrinox2014-02-15 14:26:19
B
9
S
1
Posts: 97
Reputation: 715


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, Lancifer, richcoz81 and 27 guests