Score

Discuss game development design and post your game ideas

Post » Sat Oct 21, 2017 3:39 am

Hey, someone can give me tips about how can make score on a game? I´ve try various ways, but I can´t
B
8
S
4
G
2
Posts: 4
Reputation: 1,712

Post » Sat Nov 04, 2017 10:42 am

You can put a text object on your layout. After you create a instance variable on the text named "Score". You've guessed that it will be a number a 0. You go to your event sheet. It will be something similar to this :

Every tick : Set text to text.Scorevalue

After, you will add your player on collision with gold (for example)

Player on collision with gold : Add 1 to Score
It's dangerous to go alone, take Construct 2!
B
12
S
5
G
2
Posts: 31
Reputation: 1,973

Post » Sun Nov 05, 2017 8:15 am

MrQuickGame wrote:You can put a text object on your layout. After you create a instance variable on the text named "Score". You've guessed that it will be a number a 0. You go to your event sheet. It will be something similar to this :

Every tick : Set text to text.Scorevalue

After, you will add your player on collision with gold (for example)

Player on collision with gold : Add 1 to Score


Every tick is a bad idea. Just make a function "Score.Add"

On Func "Score.Add"
-> System -> Add to Score [Function.Param(0)] //which is the passed score
-> Textobject -> Set text to [Score]

This keeps the performance of your game high. Then the text obj. will only be updated when the value has changed, and not every tick.

Regards
Andy
Image Image iTunes: Match3 | Google Play: Match3
B
105
S
38
G
31
Posts: 1,164
Reputation: 29,078


Return to Game Development, Design & Ideas

Who is online

Users browsing this forum: No registered users and 1 guest