How do I add score ?

Get help using Construct 2

Post » Thu Sep 07, 2017 8:45 am

I know how looks lerp function

but i dont know how use lerp with numbers/counters

how do i add score using lerp?
Last edited by maxwell88 on Mon Feb 19, 2018 6:50 pm, edited 1 time in total.
B
10
S
2
Posts: 44
Reputation: 721

Post » Thu Sep 07, 2017 10:11 am

For example you want to add bonus score to player depending on how accurate the shot was.
You can do something like this:
Code: Select all
Add Lerp(minBonus, maxBonus, accuracy)  to TotalScore


accuracy should be from 0 to 1
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
127
Posts: 1,762
Reputation: 67,845

Post » Fri Feb 16, 2018 12:34 pm

dop2000 wrote:For example you want to add bonus score to player depending on how accurate the shot was.
You can do something like this:
Code: Select all
Add Lerp(minBonus, maxBonus, accuracy)  to TotalScore


accuracy should be from 0 to 1


i dont get it, :( con you show this in capx example? or printscreen of code ?
B
10
S
2
Posts: 44
Reputation: 721

Post » Fri Feb 16, 2018 1:05 pm

I'm now not sure what did you mean by "add score using lerp"?
Do you want to animate the score?
See this capx:
https://www.dropbox.com/s/mlxdp26q0vwtd ... .capx?dl=0
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
127
Posts: 1,762
Reputation: 67,845


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 15 guests