Pages: 1
Topic closed
Is there a way to include the (numerical) value of a variable in a sprite's Say or Think block?
Example: An entertainment contest competitor receives scores in a 1 to 4 range from three judges. Each judge;s score for this contestant is a variable, and the total is a variable CombinedScore. We would like the "host" sprite to be able to Say something like "And our first contestant has received a total score of 7 points from our judges." but with the current value of CombinedScore where I wrote 7.
We've implemented this with a horrendous set of nested if-then-else blocks, testing each possible value of the variable. Is there a way to get the value printed out within the Say text in a more compact script?
Thanks!
==mitch
Offline
In the posted question, I was overlooking the alternative of having a [blocks] <say[ <{ Score }> [/blocks] as a step by itself. So there would be a previous [blocks]<say[ The contestant's score is ]for( 3 )secs> [/blocks] and then the number by itself.
It would still be nice to be able to mix. Maybe if variable-value blocks or number-calculation blocks could go into a (new) convert-to-print block of some sort, which could go into a text field like Say, right alongside or mixed with text the programmer supplies.
==mitch
Offline
So I see you solved it yourself. You can put in round edged blocks (like variables) in the say blocks, has well as the diamond shaped boolean ones
Offline
Topic closed
Pages: 1