How do I reload score

Get help using Construct 2

Post » Sun Mar 23, 2014 7:36 pm

I have tried to figure this out but I am just plain stuck. I made a demo of my issue I just do not understand what I am missing. Any help I would be very greatful.

Simple 2 laypout
#1 Start
#2 Game

click red sprite to go to game
used simple mouse clicks left and right to move, when you hit the yellow sprite you go back to the start layout.
Simple scoring: each move left or right is equal to 1

The issue I can not figure out is that when you go back to the start layout and then click again to go to the game layout the score is not there. I do not wish for the score to continue I just want it to start over.

I have tried reset/reload/destroy I understand this is a simple newbie mistake but could someone please help???
You do not have the required permissions to view the files attached to this post.
B
7
Posts: 19
Reputation: 345

Post » Sun Mar 23, 2014 7:58 pm

Code: Select all
On start of layout
Set score to 0


Global variables are a permanent thing, so even if on the top it says "Global number score = 0" that's just the initiation of the variable, but any changes to it will be permanent.
You can also use the action "Reset global variables" if that's what you need
B
84
S
22
G
15
Posts: 1,039
Reputation: 15,249

Post » Sun Mar 23, 2014 8:08 pm

Tried it still no joy!
You do not have the required permissions to view the files attached to this post.
B
7
Posts: 19
Reputation: 345

Post » Sun Mar 23, 2014 8:17 pm

Maybe if you put it in the other event sheet
B
84
S
22
G
15
Posts: 1,039
Reputation: 15,249

Post » Sun Mar 23, 2014 8:22 pm

I have tried both, tested in chrome/ie/firefox. score text will not show second enter. The only thing I have found that will work is browser/reload
B
7
Posts: 19
Reputation: 345

Post » Wed Mar 26, 2014 1:32 am

Have no idea if this will help anyone else but I've found my issue:

Global yes/no -- NO
You do not have the required permissions to view the files attached to this post.
B
7
Posts: 19
Reputation: 345


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 36 guests