How do I Make My Game Properly Reset

Get help using Construct 2

Post » Mon Nov 07, 2016 1:56 pm

Hi,

I'm building a space invader clone. In order to make my shields deplete across levels I had to set the shields Object Type Properties to a Global YES.

And then in order to make the shields regenerate at the start of a new game I added a Save state at load and then did a Load of the Save state on a new game.

However, for some reason when I do this my invaders no longer collide with my wall and fly off the screen at a new game.

Files here....

https://www.dropbox.com/s/nurwkk2gwn2wg ... .capx?dl=0

I would be grateful for any ideas please!?

Philip
B
6
Posts: 14
Reputation: 278

Post » Mon Nov 07, 2016 2:33 pm

Sorry, I can't quite grasp what the issue is..
Game works fine for me.
No invaders are flying off the screen.

Which wall do you mean?
Are you sure you provided the correct .capx?
"We can't solve problems by using the same kind of thinking we used when we created them."
- Albert Einstein
B
27
S
11
G
8
Posts: 528
Reputation: 7,091

Post » Mon Nov 07, 2016 3:45 pm

Hi!

Yea, sorry I didnt explain properly. :P

The invaders only fly off the screen on the second game. You have to let the game end once. then restart by pressing "S"

this next game they will fly off screen.

Thanks for the help!

p
B
6
Posts: 14
Reputation: 278

Post » Mon Nov 07, 2016 11:20 pm

Honestly, I have no idea what exactly causes this.
Must have something to do with the save state.
Try to replace or remove that if possible, should fix it.

Nonetheless, here is a temporary fix to make it work until you find a solution:
Image
Just replace the numbers by the X value you want.
(Or use Window.Width)
"We can't solve problems by using the same kind of thinking we used when we created them."
- Albert Einstein
B
27
S
11
G
8
Posts: 528
Reputation: 7,091


Return to How do I....?

Who is online

Users browsing this forum: Apollo14 and 28 guests