How do I transfer the closing score to a final layer?

Get help using Construct 2

Post » Sun Mar 13, 2016 4:46 pm

Hi everybody,
I am new to C2 and working on it with a lot of fun, but also having a lot of questions ;-)
Here is one of them:
How can I move the closing score in my game to another (the final) layer? When the player loses in my game, his score is shown on the game-layer. Now, I programmed this situation in a way, that it switches to another layer saying sth like "Sorry pilot, not good enough, try again". But I don't know what event I should set that on this last layer the score is shown for the player.
Can someone help please?
B
3
Posts: 2
Reputation: 205

Post » Sun Mar 13, 2016 5:29 pm

I assume that the score on the game layout is stored in a variable. If not, just add a variable on the game layout's event sheet and every tick set the variable to the score. You probably already have a text object on the final layer that says "Your score was ...", note that this object must be unique and not just the instance of a text object used somewhere else. Anyway, in the final layout's events, create an On start of layout, and add a (text object with score)>Set text. In here, you can just say "Sorry pilot" or something (if you have that text already with another object then you don't need that) and after that put an & to add up the strings, and just put in the name of the variable that you saved the score in. So it should be like this:
"Your score was" & TotalScore
In this case TotalScore is the variable.
B
18
S
5
G
3
Posts: 25
Reputation: 2,391

Post » Sun Mar 13, 2016 9:39 pm

Thanks Daemon, I'll try that. In any case I see, it's not only the 1,2,3 kind of doing it.
B
3
Posts: 2
Reputation: 205


Return to How do I....?

Who is online

Users browsing this forum: Lancifer, plinkie, zenox98 and 7 guests