Hi. I would normally just figure this out on my own through trial and error, but I’m trying to get this completed by tomorrow night.
I am creating a Jeopardy style game where I can help my class review for their final assessment. I will be doing all the clicking and such, but I want to make it idiot proof so some of my fellow instructors can use it for their class.
When a ‘contestant’ chooses a category a dollar value, I want to be able to click the dollar value and have the “answer” (remember answers in Jeopardy show first, the contestant guesses the question) pop-up (not sure if I can have a chosen scene popup in front of another scene, i would like this best because I can have each answer/question be its own scene) in front of the game board. Then after they guess the question, return to the game board and have the chosen box be a blank (i.e. I don’t want to see the $100 underneath the category). I know I could do this in Powerpoint with a zillion slides, but that would be very time consuming and massive.
So, what would be the best way for me to tackle this? Javascript (I am not great with javascript, I always used HTML back in my day)? Or is there other hype tools I can use?
I’m not sure how that helps me. I’ve already got the whole board designed, I’m just not sure the best way to show the questions/answers. All my dollar amounts are buttons. Here is a sample.
Could I make my buttons persistent symbols? If I have the buttons link to the scenes with my questions, then my question scenes link back to my game board, can I have my buttons disappear after they have been clicked?
it’s quite easy to achieve with a few lines of code and you’ll be able to handle this on your own.
demofile: jeopardy_version.hype.zip (76.7 KB) (just added content for the first two buttons …)
Steps to do:
give a unique ID to every button using the inspector panel. add behaviour to it that runs the javascript ‘getID’
fill the js in the head with the ids, answers and questions
add a close-button to the answer/question-scene which leads to the playgroundscene.
add a display none js-line to the getId-script that targets the current id.
btw there’s no need for a extra scene which displays the answers. simplay doisplay it in thegamescene on a timeline
My only concern by doing it on the timeline, is doesn’t the timeline force me to do everything in a certain order? I want to be able to pick at random any value from any category.
From another post I got the idea to use the following javascript function
hypeDocument.getElementById(‘PS200’).style.display = ‘none’;
This allows me to do what I want, except it isn’t persistent. So, if I click the $100 in column one, the answer/question pops up, I click to return, and the $100 is invisible. But, when I click the $200 in column one, when I return to the board, only the $200 is invisible. How can I make the javascript function persistant? Is my only option to upgrade to Pro and use a symbol? Would that even work?
Here is a sample of my game board that removes the value you click on. jeopardy.zip (199.1 KB)
every sceneload will start from zero (except of persistant symbols), but if you act within just one scene (timelines as mentioned) changes will be consistent
Correct me if I’m wrong, but if I use timelines, I would need a rediculous amount of timelines to do do what I want. I would need a timeline for every possible random choice.
I think I see where you are going with this. So, the below script is loaded into the header.
<script>
var clickedId = null;
var jeopardy =
{
"p$100" : {"answer" : "IS THIS WHERE I TYPE THE TEXT I WANT SEEN?", "question" : "WILL THIS TEXT BE SEEN?"},
"p$200" : {"answer" : "WILL THIS TEXT BE SEEN?", "question" : "WILL THIS TEXT BE SEEN?"}
//and so on ...
};
</script>
So, does the get(id) function load the element.id as the clickedId? Is this then suppose to choose the correct line in the header based on element.id? All it seems to do for me is load the next scene. For what you suggested in the header, it looks as I could put my questions in the header. But, it doesn’t seem to work that way.