Want to make something like a scoreboard

Get help using Construct 2

Post » Wed Jan 08, 2014 2:47 pm

Hey,

I am new to Construct 2 and its my first time posting on the forums so forgive me if I make a few mistakes with posting.

I have searched and checked out some examples but i have not found what i would like to do.

I am using the flying template and would like, when the player dies, to show a message with their score and their best score. Can anyone possibly help me with creating variables and a pop up for it? as well as a button to restart. I do understand all the basics of programming.

Thank you :D
B
9
S
1
Posts: 48
Reputation: 675

Post » Wed Jan 08, 2014 4:24 pm

if you know the basics, then you understand how to use a variable for the score, right?

what you described entails a variable, creation of some objects, and finally a key to restart layout (which is already an action in C2)

it sounds like you should just have a go at making it and come back if you run into a specific problem
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Wed Jan 08, 2014 4:29 pm

Yeah that sounds like a great idea and since i have been doing that, i just cant figure out, since it doesnt look like Construct has specific IF functions, how would i say that if score>best then score=best? Thanks for the reply by the way :P
B
9
S
1
Posts: 48
Reputation: 675

Post » Wed Jan 08, 2014 5:04 pm

system compare two values: score>bestscore : system set variable bestscore to score?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Jan 08, 2014 5:16 pm

Oooooh okay.. I couldnt find that, maybe coz i skimmed through it, Thank you :D what about testing if an instance still exists in a layout? because once the player has been destroyed i need to stop the score from adding up, sorry for all the amateurish questions >_<
B
9
S
1
Posts: 48
Reputation: 675

Post » Wed Jan 08, 2014 5:22 pm

You could just add an event on player destroyed.

or you could add a system compare player.count is 0

or put all the events concerning the score in a group and deactivate it in the same event you destroy the player.

There's probably more possibilities I can't think of in these 5 seconds

But how could the score go up anyway if the player is destroyed?

I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Jan 08, 2014 5:29 pm

Oh okay i understand, i'll try and see which one is best suited :P The score keeps going up because its the flying template and it just does it on system every tick
B
9
S
1
Posts: 48
Reputation: 675


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 13 guests