playMaker

Author Topic: Assigning Multiple Choice Answers to objects  (Read 520 times)

dshad44

  • Junior Playmaker
  • **
  • Posts: 55
    • View Profile
Assigning Multiple Choice Answers to objects
« on: July 06, 2017, 02:03:26 PM »
Ive got a setup where the game asks you a question and you must pick the correct answer. You have three different answers to choose from, so I generate three game objects with an image of the answers parented from which you must choose.

I want to randomize where the correct answer is, so I created a collection of the three objects: one with the right answer on the left, one in the middle, and one on the right. I can randomize which of these three will be generated with the Random Game Object action, but my question is:

How do I assign the answers to the randomized game objects?

I just want the image with the "correct" tag or layer to be assigned to the corresponding object. How would I go about doing that? To be honest, I'm not even sure if layers can be used for that.

Thanks in advance

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 4108
    • View Profile
    • jinxtergames
Re: Assigning Multiple Choice Answers to objects
« Reply #1 on: July 06, 2017, 07:09:30 PM »
Hi,
There is an action called 'Game Object Tag Switch'
This you can use this on the selected gameobject.
or 'Game Object Compare Tag'

dshad44

  • Junior Playmaker
  • **
  • Posts: 55
    • View Profile
Re: Assigning Multiple Choice Answers to objects
« Reply #2 on: July 11, 2017, 05:46:50 PM »
'Game Object Compare Tag' worked perfectly for my needs!

Thanks so much!