playMaker

Author Topic: (SOLVED) How to MOUSE ENTER on 1 gameobject then MOUSE DOWN on another?  (Read 3087 times)

bkups2003

  • Playmaker Newbie
  • *
  • Posts: 49
Hi,

I am really having trouble trying to get a MOUSE ENTER on a cube to only happen if the mouse had already MOUSE DOWNed on another cube. I don't want the MOUSE ENTER to take effect unless a MOUSE DOWN has already happened on another cube (but not a mouse down on the background or anything).

Can someone give me any advice on this? I'm absolutalely lost with this.

Thanks so much.

edit: post was long. made it shorter and more to the point.
« Last Edit: September 03, 2013, 12:36:50 PM by bkups2003 »

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: How to MOUSE ENTER on 1 gameobject then MOUSE DOWN on another?
« Reply #1 on: September 03, 2013, 09:54:21 AM »
Can you post a screenshot of the FSM?
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

bkups2003

  • Playmaker Newbie
  • *
  • Posts: 49
Re: How to MOUSE ENTER on 1 gameobject then MOUSE DOWN on another?
« Reply #2 on: September 03, 2013, 11:23:13 AM »
Oh right now there's nothing really to take a screenshot of. I've just begun testing. But i can write a quick example:

Cube1 just has a MOUSE DOWN global transition so that it will go into that state when i click down. Cube2 just has a MOUSE ENTER global transition that will make it do something. Clear enough. But i don't want Cube2s MOUSE ENTER to trigger unless Cube1s MOUSE DOWN has triggered first.

I can't just enable the cube2 FSM on cube1s MOUSE DOWN either because in the end, i want both FSMs to be identicle. ie. I can MOUSE DOWN cube2 then MOUSE ENTER cube 1 also.

I hope i explained it clearly.  :)

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: How to MOUSE ENTER on 1 gameobject then MOUSE DOWN on another?
« Reply #3 on: September 03, 2013, 11:42:45 AM »
So simply don't use global transitions, just wire up the states with mouse down actions instead. Then you can easily restrict when the states can be reached.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

bkups2003

  • Playmaker Newbie
  • *
  • Posts: 49
Re: How to MOUSE ENTER on 1 gameobject then MOUSE DOWN on another?
« Reply #4 on: September 03, 2013, 11:58:23 AM »
That's an excellent idea. I would assume that the Mouse Over in the "mouse pick event" action would take the place of mouse enter? As when it finishes the action, assuming it doesn't check every frame, it would just be 1 frame seeing it enter anyway. Am i right in how i understood that?

Thanks for your answer. I did have a look through the actions and only really took notice to the mouse up and down actions and didn't really take the time i shoulda, to find mouse pick.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: How to MOUSE ENTER on 1 gameobject then MOUSE DOWN on another?
« Reply #5 on: September 03, 2013, 12:04:53 PM »
Yes, you can use Mouse Pick Event or Mouse Pick. They're quite different and it really depends on how you're setting up things to determine which you should use and what object it should be on.

I like using Mouse Pick every frame and storing the collider, then bouncing other FSM's off that data. I prefer to keep everything to manager style setups so I don't have to have FSM's on every object unless I absolutely need to.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

bkups2003

  • Playmaker Newbie
  • *
  • Posts: 49
Re: How to MOUSE ENTER on 1 gameobject then MOUSE DOWN on another?
« Reply #6 on: September 03, 2013, 12:35:05 PM »
I think you just answered the second topic i just created. Thanks again.

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: How to MOUSE ENTER on 1 gameobject then MOUSE DOWN on another?
« Reply #7 on: September 03, 2013, 12:41:53 PM »
I think you just answered the second topic i just created. Thanks again.

No problemo.

Also, you may find this useful.
http://hutonggames.com/playmakerforum/index.php?topic=3414.msg15637#msg15637
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D