Okay reading through my old posts I feel bad cause I was kinda rude/true noob.
But thats not what I wanted to ask. I created a new button called endButton and set it to be the button to start the game and end it. I did this because I set my buttons to have a different layout and the start and end buttons look bad. So my problem is when ever i swich the button from this:
and then hide answerOne the endButton does nothing. But when I unhide answerOne it still loads the quiz. What am I missing here? So it looks like this:
Once you have 'random() % numberOfQuestions', just multiply by 6 (in this case of a flat array) and index into the array. You should also randomize the position of each answer to mix things up.
I started out with random in 'That Ain't It! Trivia Game', but eventually moved to keeping track of which questions were displayed because using random was causing repeat questions more often than we liked.
Hey can we put any color to UIButton as background? instead of a normal white UIButton, like a red UIButton and when we click, a yellow button is shown and so on...
Yes, I am desperately in need of a restart function for this that also works for other apps. that is, pressing a button returns to the original view that was present when the game was first loaded.
Yes, I am desperately in need of a restart function for this that also works for other apps. that is, pressing a button returns to the original view that was present when the game was first loaded.
I have an idea that would only take a little amount of time from a somewhat skilled programmer. You could just separate the game into 3 views including main menu (has start button), the actual game view, and then the final end view which has the restart button.
When you press start at the begging, it just stacks the view,
startView -----> gameView
when the game is over, it stacks the restart view.
gameView -----> endView
then, when its time to restart, you press the restart button and all the views are unstacked.
startView <----- gameView <----- endView
I would be able to do this if it was built in IB, but since its not, i need a more skilled programmer.
This could all be done inside one window with one view controller.
There are two things I am trying to do with a quiz like this. 1, I would love to get the restart button working, but have been unsuccessful.
2, I would like to have multiple types of quizzes on the main view, with buttons leading to each quiz, but I have not had the best of luck with this either. Anyone else know how to best go about these?
There are two things I am trying to do with a quiz like this. 1, I would love to get the restart button working, but have been unsuccessful.
2, I would like to have multiple types of quizzes on the main view, with buttons leading to each quiz, but I have not had the best of luck with this either. Anyone else know how to best go about these?
If you could do #2, then #1 would come easy. Unfortunately, too much of this was done programmatically for me to help/
Thanks for the tutorial !!!
It's possible to have the question random and not always in the same order? For example i write in the txt file 100 quiz and each time i start the quizgame on my iphone it take 10 random quiz from the txt file.
Thanks
Has anyone fixed this issue: checkAnswer method or fixed it so when you press Restart Quiz it actually works?
- (IBAction)buttonOne
{
if(questionNumber == 0){
// This means that we are at the startup-state
// We need to make the other buttons visible, and start the game.
[answerTwo setHidden:NO];
[answerThree setHidden:NO];
[answerFour setHidden:NO];
[self askQuestion];
}
else
{
NSInteger theAnswerValue = 1;
[self checkAnswerint)theAnswerValue];
if(restartGame==YES)
{
[self loadQuiz];
}
}
}
So attached is the file for the Quiz using IB, but i changed up the quiz a lil bit. The only thing it is missing is when you hit the restart button, it will not load again! If any one can figure this out, PLEASE let me know!!!!!
So THIS TIME IT IS attached is the file for the Quiz using IB, but i changed up the quiz a lil bit. The only thing it is missing is when you hit the restart button, it will not load again! If any one can figure this out, PLEASE let me know!!!!!
So THIS TIME IT IS attached is the file for the Quiz using IB, but i changed up the quiz a lil bit. The only thing it is missing is when you hit the restart button, it will not load again! If any one can figure this out, PLEASE let me know!!!!!
Thanks!
Mandy
Well i could make a restart function as soon as you fix it because some of the button crash the app when pressed.
Then once you get to the quiz, hit the yes button, then the quiz will start, and you can go thru all the motions, but once you try to restart, the quiz view is back to where you left off....See what I mean? Sorry! Im sure you can figure this out... I just cant
Thank you!!! Let me know if you have any findings!