Is it possible to reset only specific globals variables?

Just started using Construct 2? Post your questions here

Post » Mon Jul 25, 2016 9:39 pm

Hello,
For example, I need to reset the ball after it goes into the goal and adds 1 to count.
But I don't want to reset the score just yet.
Thanks in advance.
B
31
S
13
G
1
Posts: 41
Reputation: 2,958

Post » Mon Jul 25, 2016 10:01 pm

@DeathSpecter9

Why dont you reset each global variable individually? Leave only the score variable
System>>Set value>>0
B
10
S
3
G
1
Posts: 46
Reputation: 1,261

Post » Tue Jul 26, 2016 1:14 am

Perfect, Thank you!
B
31
S
13
G
1
Posts: 41
Reputation: 2,958

Post » Tue Jul 26, 2016 7:15 am

I did that, sounds right, but it doesn't seem to want to work that way.
B
31
S
13
G
1
Posts: 41
Reputation: 2,958

Post » Tue Jul 26, 2016 8:13 am

Usualy the score gets written in the Local Storage. And read back on layout startup.

If you intend to not use the Local Storage, or it is not in place yet and you want to debug things ....
Then there is a easy solution like this ....
https://www.dropbox.com/s/7zxzxic7efx83 ... .capx?dl=0

Notice that SCOREbackup = static.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Tue Jul 26, 2016 11:04 pm

99Instances2Go wrote:Usualy the score gets written in the Local Storage. And read back on layout startup.

If you intend to not use the Local Storage, or it is not in place yet and you want to debug things ....
Then there is a easy solution like this ....
https://www.dropbox.com/s/7zxzxic7efx83 ... .capx?dl=0

Notice that SCOREbackup = static.


Thank you, that was real clean.
And works.
Thanks everyone.
B
31
S
13
G
1
Posts: 41
Reputation: 2,958


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests