TOUR
PRICING
HELP
Stencylpedia
Blocks Guide
Sample Games
Developer Center
FORUMS
CHAT
#MADEINSTENCYL
EDUCATION
SIGN IN
×
Welcome back!
Username or E-mail
Password
(
Forgot?
)
C
OMMUNITY
Home
Issue Tracker
Inbox [0]
New Posts
New Replies
Search
Stencyl Community
→
Stencyl
→
Ask a Question
→
How to do score ratings?
Pages:
1
How to do score ratings?
ManlyMouse
Posts: 144
October 24, 2014, 01:59:50 pm
Hey guys,
I want to give final scores in my game a rating from F to A. Say you have 40 points by the end of a round, and that would be considered an F while 50 points would be considered a D and so on. Any thoughts?
I know more about Stencyl now.
Rimrook
Posts: 251
October 24, 2014, 03:03:38 pm
Easy. Just have some IF statements to determine what rating the player has based on their score.
Start with the lowest amount like this (imagine these are code blocks)
SCORE being a number attribute
RATING being a text attribute
(less than 50 is an F)
if SCORE < 50
set RATING to F
(more than 50 is an D)
if SCORE > 50
set RATING to D
(more than 60 is an C)
if SCORE > 60
set RATING to C
and so on. at the end, draw the rating as text and display it with the score or whatever you plan to do with it.
Hope this helps. I'll watch the topic if you need more help.
Working on Super Matt Jordan.
http://www.youtube.com/watch?v=EOI5h80-RF4&feature=share&list=UUZuRme48Um2DfESXC1brJwQ
ManlyMouse
Posts: 144
October 27, 2014, 08:10:24 pm
Thank you!
I had something very similar in place but for some reason, it made all the scores receive the highest rating. I think I overcomplicated it. Thank you again.
I know more about Stencyl now.
Pages:
1