playMaker

Author Topic: Randomize Answers, excluding the correct answer.  (Read 545 times)

dshad44

  • Junior Playmaker
  • **
  • Posts: 55
    • View Profile
Randomize Answers, excluding the correct answer.
« on: August 22, 2017, 03:52:22 PM »
I'm trying to make a multiple choice game. You have three objects to choose from, and one of them is correct. The way you choose is that each object has an image texture assigned. You must choose based on the image being presented by the three objects.

Ultimately, there are many images in my Assets directory that I want to draw from and assign to the objects. I think the way I can randomize the images assigned is to use Send Random Event, and have multiple states in which a different material or texture can be assigned.

I can use Set Material or Set Material Texture for the object with the "right answer" directly, and then use Send Random Event to get randomized options for the "incorrect answers".

However, this doesn't keep me from being able to accidentally select the "right answer" and assign it if I use Send Random Event.  I would have to manually make sure that only the "incorrect answers" are part of my Send Random Event tree. But if I have to do that for each question, that's a ton of work!

Is there a better way to approach this?
Thanks in advance!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4556
    • View Profile
    • jinxtergames
Re: Randomize Answers, excluding the correct answer.
« Reply #1 on: August 22, 2017, 05:59:59 PM »
Hi,
I think you want to look into arrays / array maker.

You can find several tutorials on the user tutorial wiki page

or DataMaker and use xml/json
or a combination of the 2.

Depending on your game setup.


dshad44

  • Junior Playmaker
  • **
  • Posts: 55
    • View Profile
Re: Randomize Answers, excluding the correct answer.
« Reply #2 on: August 23, 2017, 12:32:32 AM »
Ok, I'll start looking at some of these videos. Thanks again!