Playmaker Forum

Playmaker Help & Tips => Playmaker Help => Topic started by: wallaceb68 on September 17, 2013, 05:55:29 AM

Title: mouse hover (SOLVED)(ALMOST)(SOLVED)
Post by: wallaceb68 on September 17, 2013, 05:55:29 AM
ok will someone please point me in the right direction.
i am wanting that when my mouse hover's over a object to get a gui button to appear. ive been looking for two days on how to do this with no luck. thanks
Title: Re: mouse hover
Post by: Lane on September 17, 2013, 06:03:58 AM
Use can use Mouse Pick or Mouse Pick Event.
Title: Re: mouse hover
Post by: wallaceb68 on September 17, 2013, 06:22:26 AM
Perfect, thanks so much. i was almost there but keep over looking that one. thanks again.
Title: Re: mouse hover (SOLVED)
Post by: wallaceb68 on September 17, 2013, 06:59:00 AM
ok one more thing-
how do i get the gui to stay on the object and not rotate with the player camera
Title: Re: mouse hover (SOLVED)(ALMOST)
Post by: Lane on September 17, 2013, 07:02:09 AM
This thread might help:

http://hutonggames.com/playmakerforum/index.php?topic=4941.0

Also look at GUILayout Begin Area Follow Object
Title: Re: mouse hover (SOLVED)(ALMOST)
Post by: wallaceb68 on September 17, 2013, 09:39:42 AM
Thank you Lane for helping me, and being patient, i got the GUISkin made but cant figure where to put it. the tut's say i need to edit my script to allow it. There is my problem: what script? can you point me to a tut. vid. that will walk me throw this step by step? thanks again for all your help.
Title: Re: mouse hover (SOLVED)(ALMOST)
Post by: Lane on September 17, 2013, 09:56:17 AM
Check this scene out, its got the GUI hovering over objects when the mouse touches it, camera movement doesn't bother it.
Title: Re: mouse hover (SOLVED)(ALMOST)
Post by: wallaceb68 on September 17, 2013, 10:54:35 AM
that works great, but how do i skin it the way the other post was saying?
Title: Re: mouse hover (SOLVED)(ALMOST)
Post by: Lane on September 17, 2013, 10:59:47 AM
Create a new GUI Skin and use the Set GUI Skin action to define it globally.
Title: Re: mouse hover (SOLVED)(ALMOST)
Post by: wallaceb68 on September 17, 2013, 11:08:31 AM
once again, thanks for being so patient, but that is where i am stuck.
i created the new skin and put "set gui skin" in the state in play maker, but i cant figure out how to get the new skin in there.  how do i define it globally?
Title: Re: mouse hover (SOLVED)(ALMOST)
Post by: Lane on September 17, 2013, 11:11:45 AM
When you create it, the Skin is placed in your project hierarchy as an Asset. Just find that state with the Set GUI Skin action, then drag the Skin Asset from the hierarchy into the empty slot in the Set GUI Skin action. It has a checkbox for applying it globally, which is on by default.
Title: Re: mouse hover (SOLVED)(ALMOST)
Post by: wallaceb68 on September 17, 2013, 11:38:51 AM
ok there is my problem. when i go into the set gui skin and click the little circle to look for the guiskin i made it say's NONE even in my scene.
but it is in the project folder. any ideals why this is happening?
Title: Re: mouse hover (SOLVED)(ALMOST)
Post by: Lane on September 17, 2013, 11:39:52 AM
Have you tried dragging it from the project hierarchy and into the empty field next to that little circle button?
Title: Re: mouse hover (SOLVED)(ALMOST)
Post by: wallaceb68 on September 17, 2013, 11:45:22 AM
GOT IT! that worked. i had the project and the playmaker in the same tad. when i moved playmaker to where i could see both at the same time i was able to drag it onto set gui skin. THANK YOU so much for your help. being a newbie i was beating my head trying to figure it out. Thanks again for your help.
Title: Re: mouse hover (SOLVED)(ALMOST)
Post by: Lane on September 17, 2013, 11:47:11 AM
No problemo.   :)
Title: Re: mouse hover (SOLVED)(ALMOST)(SOLVED)
Post by: wallaceb68 on September 18, 2013, 09:51:57 AM
ok i ran into another problem. i did everything that was stated about, but with a few changes. and it works for the most part.
i am useing mouse pick event. and i have it to where when the mouse hovers over the object a button is displayed.(perfect just what i wanted)
Mouse off the button goes away. (perfect just what i wanted)
upon mouse down it sends it to another state.(perfect just what i wanted)
here is my problem i also have the same set-up in 2nd state,
but i cant get it to act the same.if i use mouse pick event with "mouse down" the button is there all the time. but if i use "mouse hover" and "mouse off" it just send's it right to the next state.
i want to hover over the object and it will bring the button up, if i move off it, it should go away, if i click on the button it will send me to the 2nd state, and in that state i want the same thing, mouse hover-button, mouse off-no button, click on button send's the object to the 3rd state. i hope i explained this ok. thanks
Title: Re: mouse hover (SOLVED)(ALMOST)(SOLVED)
Post by: Lane on September 18, 2013, 10:21:07 AM
Like this?

Title: Re: mouse hover (SOLVED)(ALMOST)(SOLVED)
Post by: wallaceb68 on September 18, 2013, 10:34:16 AM
yes sort of. except when it goes to state 2 and then state 3 i only need it to reset to the previous state, not all the way back to state 1.  thanks again for all the help lane.