Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Tkfore21 on July 27, 2013, 04:01:15 PM
-
I'm trying to choose a randomly picked object and make it visible. However there seems to be a piece of logic- i.e. Playmaker Action, which I can't find, and I'm hoping someone can point me in the right direction.
How it's setup:
- I have five objects, all set to "not-active" in Inspector, and I've setup an FSM with the "Select Random Game Object" Action as one of the states.
- I set the "Game Objects" value to 5 at the top.
- I add the five objects in the fields and change the Weight to 1 for all of them so they have the same chance of being picked.
- Store the results as a variable I created with it designated as a "GameObject".
- Set the transition to "Finished" and point it to a new State.
I now want to be able to use the PM Action "Set Properties" on that one randomly chosen object to make it active and visible. I created a new state in the FSM and can't figure out how to choose the object from the variable.
If anyone can help, I would greatly appreciate it.
-
you should be able to simply use "activate gameobject" and use your variable as the reference for which object to activate :)
Unless i misunderstood your situation, which is quite possible
-
Thank you!
You just help figure out the last piece I needed for one of the game modes I'm working on. 53 days to go.
-
You're welcome! Glad to be of help :)