playMaker

Author Topic: Question about using random objects [SOLVED]  (Read 2200 times)

Tkfore21

  • Playmaker Newbie
  • *
  • Posts: 11
Question about using random objects [SOLVED]
« 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.
« Last Edit: July 27, 2013, 04:33:44 PM by Tkfore21 »

KozTheBoss

  • Full Member
  • ***
  • Posts: 150
  • You dont fail unless you give up trying to succeed
    • Pixel Life - portfolio
Re: Question about using random objects
« Reply #1 on: July 27, 2013, 04:21:18 PM »
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
Remember, you don't fail unless you give up trying to succeed!

Tkfore21

  • Playmaker Newbie
  • *
  • Posts: 11
Re: Question about using random objects
« Reply #2 on: July 27, 2013, 04:28:47 PM »
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.

KozTheBoss

  • Full Member
  • ***
  • Posts: 150
  • You dont fail unless you give up trying to succeed
    • Pixel Life - portfolio
Re: Question about using random objects [SOLVED]
« Reply #3 on: July 29, 2013, 10:37:35 AM »
You're welcome! Glad to be of help :)
Remember, you don't fail unless you give up trying to succeed!