playMaker

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

gordonramp

  • Playmaker Newbie
  • *
  • Posts: 5
    • View Profile
Click multiple gameobjects to create an event?[SOLVED]
« on: October 25, 2013, 09:14:18 PM »
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 27, 2013, 10:27:13 PM by jeanfabre »

uberwolfe

  • Junior Playmaker
  • **
  • Posts: 59
    • View Profile
Re: Click multiple gameobjects to create an event?
« Reply #1 on: October 25, 2013, 10:41:44 PM »
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 25, 2013, 10:59:30 PM by uberwolfe »

gordonramp

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

Yanifska

  • Full Member
  • ***
  • Posts: 159
    • View Profile
    • My Portfolio
Re: Click multiple gameobjects to create an event?
« Reply #3 on: October 27, 2013, 07: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
    • View Profile
Re: Click multiple gameobjects to create an event?
« Reply #4 on: October 27, 2013, 01:43:44 PM »
Thanks Yanifska, that is most helpful.