How to fix the score?

Get help using Construct 2

Post » Sun Mar 03, 2013 3:10 pm

So I'm new too Construct 2 and I've just began making a game in which you are a square and have to avoid other squares, if they hit you, you die. Every five seconds a new square spawns making it harder to dodge them since there is more squares on the screen.

You get one point for every second you survive, however the score continues to add up even when you've died. Does anybody know any way of fixing this?

Here is the link:

https://www.dropbox.com/s/r2fwr6eqpjcgx2d/New%20Square%20Game.capx.lnk?m

Thank you in advance.
B
4
S
1
G
3
Posts: 5
Reputation: 2,037

Post » Sun Mar 03, 2013 5:11 pm

You'e posted a link, not the actual capx.
ImageImageImage
B
67
S
19
G
123
Posts: 3,209
Reputation: 73,905

Post » Tue Mar 05, 2013 5:09 pm

Do you not just have to click on download when you click the link?
B
4
S
1
G
3
Posts: 5
Reputation: 2,037

Post » Tue Mar 05, 2013 6:57 pm

Just put a value somewhere... Lets call it "dead"
Add this as a condition when you add to the score -- dead=0
when you die you set dead=1 so it won't add to the score.

Well I might miss something, or your problem is easily solved. :)

WizLore2013-03-05 18:58:11
B
9
S
4
G
1
Posts: 102
Reputation: 2,274

Post » Wed Mar 06, 2013 8:43 pm

[QUOTE=WizLore] Just put a value somewhere... Lets call it "dead"
Add this as a condition when you add to the score -- dead=0
when you die you set dead=1 so it won't add to the score.

Well I might miss something, or your problem is easily solved. :)

[/QUOTE]

Hey man thanks for the help, although I don't really know what you mean. Sorry it's just that I'm new to Construct.
B
4
S
1
G
3
Posts: 5
Reputation: 2,037

Post » Wed Mar 06, 2013 9:32 pm

it's because , even if you are "dead" , the monsters collide with the player , you can fix this issue by destroying the player object ...

Cheers...
B
35
S
16
G
16
Posts: 2,222
Reputation: 16,589

Post » Thu Mar 07, 2013 3:27 pm

[QUOTE=Whiteclaws] it's because , even if you are "dead" , the monsters collide with the player , you can fix this issue by destroying the player object ...

Cheers...[/QUOTE]

But I already have that done? On collision with an enemy the player sprite is destroyed?
B
4
S
1
G
3
Posts: 5
Reputation: 2,037

Post » Thu Mar 07, 2013 5:40 pm

I have not loaded or looked at your capx,but if your score is still going up,You must have a condition similar to:-

>every 1 second...add 1 to score

so all you need to do is add

>player sprite is on screen
every 1 second               ....add 1 to score

so when your square is not on screen your score should stop rising...

hope that helps.
As long as I can move left, right and fire, I'm Happy...
B
42
S
15
G
11
Posts: 655
Reputation: 12,260

Post » Fri Mar 08, 2013 8:46 pm

Cheers man! It worked!
B
4
S
1
G
3
Posts: 5
Reputation: 2,037


Return to How do I....?

Who is online

Users browsing this forum: DiabloOvermind, Skebab, spcsmrf, Yahoo [Bot] and 19 guests