How to stop score from updating

Get help using Construct 2

Post » Fri Apr 06, 2012 11:29 pm

Hello I have a 2 small problems
my score it set on a time system(so every .5 seconds of being alive you are awarded 1 point)

But whenever you die the score keeps being added but I want it to come to a stop.




also, was wondering how would you add a pause button using just "P" on the keyboard

I have tryed
on key pressed>set time scale 0
not sure how to get it to unpause tho=\

Thanks
Slewot
Slewot2012-04-07 19:25:06
B
2
Posts: 2
Reputation: 379

Post » Sat Apr 07, 2012 12:22 pm

on key pressed > timescale=0?1:0

should pause and unpause it
B
22
S
11
G
9
Posts: 133
Reputation: 6,572

Post » Sat Apr 07, 2012 1:12 pm

event : system ,timescale = 0 = pause
event : system,timescale = 1 = normal play..
this is the speed of the game so if you made it 2 it will be soo fast.. like that even the time..
B
48
S
15
G
6
Posts: 795
Reputation: 12,035

Post » Sat Apr 07, 2012 7:14 pm

Now could somebody answer the first question to get the score to stop updating once the player is hit by an object

I have it set to

every tick > add 4 to score
set text "Score" & Score

what am I missing?
B
2
Posts: 2
Reputation: 379

Post » Sat Apr 07, 2012 7:45 pm

Wouldn't a variable work?

Set a variable on player object as 1, then only add the score if variable = 1. When the player gets hit by an object set variable to 0 and finally reset variable back to 1 if you need it.
B
25
S
161
G
3
Posts: 51
Reputation: 18,702

Post » Sat Apr 07, 2012 7:55 pm

hmm ok everytick = everytime the game on you will get 4 to score.

so i would say make it :
on the start of layout => add4 to score.


and in the event that player die for example:
player collision with monster => put action player destroy and go to the end layout (new layout).


or you could use boolean (a live = true) , (dead = false)
B
48
S
15
G
6
Posts: 795
Reputation: 12,035


Return to How do I....?

Who is online

Users browsing this forum: Unconnected and 30 guests