Hi there,
I have a problem with my very first game with C2. It's a puzzle game and you have to make disappear the cubes on the screen.
In every level I added an object that acts like a button that should restart the layout when clicked if you did it wrong. The problem is that when you click on restart, it does, yes, but inmediately changes to the next layout as if level was finished and I don't know why.
I have a global variable called "cubes_level_01" = 3. And there's an event that leads you to next level:
EVENT:
System - "cubes_level_01" (less or equal to) 0
ACTIONS:
System - Wait 2.0 seconds
System - Go to "level_01_finished" (name of next layout)
If you play, game runs correctly. But if you try at any moment the restart button, it leads you to the next layout. The event for reset is:
EVENT:
Mouse - On left button clicked on "reset_button"
ACTIONS:
System - Restart layout
System - Reset global variables to default
I suppose that the problem is that when you reset level, "cubes_level_01" variable turns automaticaly to zero. It's the only explanation, but I can't find why. Can you help me, please?
Thanks in advance.