Page 1 of 1
global feedback
Posted: Fri Nov 30, 2018 11:29 am
by inkachinka
Hello folks!
I started learning livecode a week ago and now gotta work on a project as uni homework.
I wanna create a questionnaire with 4 options for each question (I'll use radio buttons).
And in the end the user should get a feedback depending on which option has the most score throughout the questionnaire.
What exactly do I need to write in the feedback card script?
thanks in advance

Re: global feedback
Posted: Fri Nov 30, 2018 11:46 am
by Klaus
Hi inkachinky,
welcome to the forum!
I would recommend to go through these stack to learn about the very basics of Livecode:
http://www.hyperactivesw.com/revscriptc ... ences.html
Best
Klaus
Re: global feedback
Posted: Fri Nov 30, 2018 5:53 pm
by jacque
First off, thanks for being up front about the purpose of your question. Some people aren't. In general we don't do school assignments for you but we're happy to answer any specific questions you may have as you work through the assignment.
You probably already figured out that you need to store the user responses somewhere as they go along. Your subject title is almost the answer, you can use a global variable as storage. Keep a list there of the answers and you can parse through those when you need to provide feedback.
Re: global feedback
Posted: Fri Nov 30, 2018 6:04 pm
by inkachinka
Yes, I figured out how to store data with global variables!

I have 4 variables now, each has different values.
How do I create a feedback according to the variable with the highest value?
I imagine I'd have to write sth like:
on mouseUp
if var1 > all other variables then
answer "something something"
...
....
end mouseUp
But I havent figured out the right progamming language and couldnt find anything related to my problem in the dictionary and google

Re: global feedback
Posted: Fri Nov 30, 2018 7:22 pm
by jacque
What are the values of the global variables? Are you keeping each answer in a different variable? If so it would be easier to work with if the answers are all in a single variable in a list with one answer per line. But let's see what you've got already first.
Re: global feedback
Posted: Fri Nov 30, 2018 8:43 pm
by dunbarx
Hi.
You might sort the four variables (I assume they are numbers) and select the last (highest) one.
When you become a little more familiar with Livecode, we can experiment with other methods.
You are on your way. Just know that the ease of starting with LiveCode must not lead you to believe that a significant amount of time is not required to become proficient. It is. The good news is that the process is fun and rewarding the whole time.
Craig Newman