Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: dshad44 on July 06, 2017, 05:03:26 PM

Title: Assigning Multiple Choice Answers to objects
Post by: dshad44 on July 06, 2017, 05: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
Title: Re: Assigning Multiple Choice Answers to objects
Post by: djaydino on July 06, 2017, 10: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'
Title: Re: Assigning Multiple Choice Answers to objects
Post by: dshad44 on July 11, 2017, 08:46:50 PM
'Game Object Compare Tag' worked perfectly for my needs!

Thanks so much!