stop counting clicks after the game is over?

Get help using Construct 2

Post » Sat Dec 22, 2012 1:09 am

I have it set up so that every time I click, it adds one to the "shots fired" things but then after the game ends and the player dies, it still adds to that text every-time you click. I'd assume I could fix it with an IF ELSE statement, but all I've accomplished is total confusion. How do I do this?
B
6
Posts: 90
Reputation: 690

Post » Sat Dec 22, 2012 2:32 am

A variable that goes to 1 if the game finishes and an action to add to your shot fired event ( If GameEnded = 0 )Whiteclaws2012-12-22 02:33:20
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589

Post » Sat Dec 22, 2012 2:35 am

[QUOTE=Whiteclaws] A variable that goes to 1 if the game finishes and an action to add to your shot fired event ( If GameEnded = 0 )[/QUOTE] Can you PM me? That would make this a lot easier. Anyways, set a global variable that, say, bumps up to one once the game ends. Then have an action, (based off what event?) that does what exactly?
B
6
Posts: 90
Reputation: 690

Post » Sat Dec 22, 2012 2:39 am

Okay , I'll try to describe it as easy as possible in steps ...
1 - Create a Variable GameEnded that starts at the value of 0
2 - In the event that triggers the end of the game , add this action : Set GameEnded to 1
3 - In the events that adds 1 to ShotsFired , add this condition : If GameEnded = 0
That's all !
Cheers ...
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589

Post » Sat Dec 22, 2012 2:40 am

[QUOTE=Whiteclaws] Okay , I'll try to describe it as easy as possible in steps ...
1 - Create a Variable GameEnded that starts at the value of 0
2 - In the event that triggers the end of the game , add this action : Set GameEnded to 1
3 - In the events that adds 1 to ShotsFired , add this condition : If GameEnded = 0
That's all !
Cheers ...[/QUOTE] Wouldn't that set the shots fired back to zero?
B
6
Posts: 90
Reputation: 690

Post » Sat Dec 22, 2012 2:44 am

Nope ... It wouldn't set it to zero , It would only make it so it won't add anymore when the game is finished !
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589

Post » Sat Dec 22, 2012 2:47 am

Would this variable be Global? I didn't know that you couls "set" anything other than text..
B
6
Posts: 90
Reputation: 690

Post » Sat Dec 22, 2012 2:49 am

Check out the manual :P
It would answer to all your little questions !
Cheers
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589

Post » Sat Dec 22, 2012 2:51 am

[QUOTE=Whiteclaws] Check out the manual :P
It would answer to all your little questions !
Cheers[/QUOTE] The manual's my best friend!haha, I"ll figure something out, hopefully. Thank you.
B
6
Posts: 90
Reputation: 690


Return to How do I....?

Who is online

Users browsing this forum: zenox98 and 23 guests