How to make a Score Screen Layout?

Get help using Construct 2

Post » Sat Nov 02, 2013 1:49 am

I tried what you told but i dont know why isnt working.
The values on screen dont change...


Decade2013-11-02 01:59:31
B
3
Posts: 6
Reputation: 216

Post » Sat Nov 02, 2013 9:59 am

You are using function.returnvalue wrong. The function gives that value back to the event that called the function, so there you could set score to function.returnvalue. BUT you don't even need it in this case.

Just set score = score*diamonds/healthlost (careful: if healthlost is 0, the value is not defined (can't divide by zero)! Add a subevent with the condition: if healthlost = 0: score = score*diamonds. And another subevent with the condition else: score = score*diamonds/healthlost.)

So your events could look like this:
on "totalscore":
- healthlost = 0 : set score = score*diamonds
- else: set score = score*diamonds/healthlost

on "healthlost": set healthlost = 3-health


done
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 788
Reputation: 3,788

Previous

Return to How do I....?

Who is online

Users browsing this forum: max2612 and 29 guests