This site requires JavaScript, please enable it in your browser!
Greenfoot back
Phytrix
Phytrix wrote ...

2013/5/29

Object interaction - ask questions

Phytrix Phytrix

2013/5/29

#
Hey guys :) I'm currently in a process of developing a platform/action game. I've run into a slight issue, however. I'm hoping to integrate learning, and am having troubles figuring out how to have a pop-up screen that asks one of many possible questions, and then determines if it was answered correctly or not. 1. How do I get a screen to pop up where the player can enter text and submit the text? 2. How do I set multiple questions and make it pick one of these questions randomly? 3. How can I determine if the question was answered correctly?
henrYoda henrYoda

2013/5/29

#
@Phytrix Have a look at the JOptionPane, from your description it is exactly what you need.
Phytrix Phytrix

2013/5/29

#
Yeah that looks like what I'm looking for. Thanks henrYoda :) Also though, what's the most effective way of creating a random selection of questions without having long and strenuous code?
You need to login to post a reply.