playMaker

Author Topic: Click multiple gameobjects to create an event?[SOLVED]  (Read 2619 times)

gordonramp

  • Playmaker Newbie
  • *
  • Posts: 5
Click multiple gameobjects to create an event?[SOLVED]
« on: October 26, 2013, 12:14:18 AM »
Hi There,
Just starting to get into Playmaker and what I am trying to achieve is this..
I have three spheres and I want to click on each one before a fourth gameobject becomes visible. So.. if this is clicked and this is clicked and this is clicked then this becomes visible.
Is there facility already built in the Playmaker to achieve such a process or will I need to create a special variable and if so, how would it look? I have managed to get it working on one sphere using 'Mouse Up' and 'Activate Game Object' but how to on three? Thanks.

« Last Edit: October 28, 2013, 01:27:13 AM by jeanfabre »

uberwolfe

  • Junior Playmaker
  • **
  • Posts: 59
Re: Click multiple gameobjects to create an event?
« Reply #1 on: October 26, 2013, 01:41:44 AM »
Hi. The following is one way you could do this:

Make sure the 4th sphere has its mesh renderer disabled in the inspector so it is invisible when the scene is played.

Create a global integer.

Create an FSM with a Mouse Pick Event on each sphere that fires off an event to add 1 to this global integer when it is clicked.

Have an FSM on the 4th sphere that watches the global integer (use Int Compare action) and enables the mesh renderer on itself when the global integer reaches 3.

You can access the mesh renderer settings on the 4th sphere by using the Set Property action, or by dragging the object onto the action window.

Hope that makes sense, happy to clarify anything if needed :)

Something like this on three spheres:


And this on the fourth sphere:
« Last Edit: October 26, 2013, 01:59:30 AM by uberwolfe »

gordonramp

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Click multiple gameobjects to create an event?
« Reply #2 on: October 26, 2013, 02:05:09 AM »
Ok, I'll play around with this idea.. :)

Yanifska

  • Full Member
  • ***
  • Posts: 163
    • My Portfolio
Re: Click multiple gameobjects to create an event?
« Reply #3 on: October 27, 2013, 10:12:43 AM »
If you havent already watched it you should check this tutorial :
Visit my portfolio: http://www.yanivcahoua.com/

gordonramp

  • Playmaker Newbie
  • *
  • Posts: 5
Re: Click multiple gameobjects to create an event?
« Reply #4 on: October 27, 2013, 04:43:44 PM »
Thanks Yanifska, that is most helpful.