Hi there
I'd like to create questionnaire with a result that collect the questions answers, every question has 4 options, every selected option collect a number and the at end of the questionnaire I can collect the numbers and show the result
MarkHunte
(Mark Hunte)
February 20, 2022, 3:44pm
#2
Have you searched the forum.
There are plenty of examples that do this.
Depending on what you want they can be complex when it comes to creating the UI.
Here is a more rounded version.
This uses an external file for the questions.
The number of questions match the number of question elements we have on the scene. And each element will be changed dynamically by the data in it’s question in the external file.
More questions will require new elements on the scene.
But I have written this so you simply just need to add them and follow the id naming convention of the question elements and the answer elements.(scene 2)
As you see above we now h…
But the idea is simple they will use JavaScript to store the values and show them later.
The storage is normally the simple bit.
The UI does not have to be complex
Less complex example using symbols and some code. ( an adaption from one of my other examples)
Using Symbols and data attributes
Radio Buttons Answers.hype.zip (40.6 KB)
1 Like
h_classen
(Hans-Gerd Claßen)
February 20, 2022, 5:15pm
#3
this'll go without custom scripting:
Interaction based on linked Conditions without scripting.
a testproject
that’s what’s possible:
linking conditions by “and” -> every condition must be met
linking conditions by “or” -> any condition can be met
When the count of triggered (running custombehaviors as hype-behavior) conditions is equal to the count of linked conditions the result will be examined and a predefined hype-custombehavior will be triggered.
////////////////
A scene or file can have several hypeConditionLinker-inst…
ah, ... and you may be able to fiddle a solution using timelines as kind of statemachine:
Here is a version that doesn't use any code whatsoever… just continues timelines as Hans suggested. I love how one can just use timelines for state management. Indeed, great @h_classen (had to give it a try for myself).
continueTimelineThreeOnCompletes.hype.zip (23,6 KB)
1 Like