playMaker
Home
Store
Showcase
Tutorials
Forums
Manual
Wiki
About Us
Playmaker Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Join our
Discord Channel
Home
Help
Search
Login
Register
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
(Moderator:
600
) »
Beginner: How to use the GUILayout Repeat Button
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Beginner: How to use the GUILayout Repeat Button (Read 4134 times)
lurig33
Playmaker Newbie
Posts: 3
Beginner: How to use the GUILayout Repeat Button
«
on:
July 31, 2013, 02:12:18 PM »
Hi there!
I´m Pretty new to playmaker, thou I have some Unity javascript experience.
I have trouble getting the "GUILayout Repeat Button" Action to work.
What I want to achieve is a GUILayout GUI with two GUILayout buttons (FSM 1) that rotates an object Right or Left(FSM 2), while the Left or Right button is pressed.
Like raising and lowering a crane arm from a GUI.
The problem seems to be that when I use the Send Event , you "of course" leaves the current State which holds the "GUI Layout Repeat Button" Action, and thus the ability to check if the button is pressed or not.
Please help me with this and point me in the right direction . :-)
Perhaps I have missed something fundamental about execution order etc.
Thanks!!
Daniel
Logged
jeanfabre
Administrator
Hero Member
Posts: 15500
Official Playmaker Support
Re: Beginner: How to use the GUILayout Repeat Button
«
Reply #1 on:
July 31, 2013, 03:44:53 PM »
Hi,
When even is fire, you move to another state, here you fire likely another event to the part that is dealing with moving the crane, then go back to the original state, you won't see any glitch on screen if you come back straight away.
bye,
Jean
Logged
lurig33
Playmaker Newbie
Posts: 3
Re: Beginner: How to use the GUILayout Repeat Button
«
Reply #2 on:
July 31, 2013, 04:57:07 PM »
Hi Jean,
Yes I understand that,
but the problem lies wiith the "GUI Layout Repeat Button" Action, that you Leave when you click that button (you change state), so it can´t check if you are still holding down the button.
, since that State is no longer active.
Have you used the GUILayout repeat button? Can you show me how you get it to work?
Thanks for our help!
Logged
jeanfabre
Administrator
Hero Member
Posts: 15500
Official Playmaker Support
Re: Beginner: How to use the GUILayout Repeat Button
«
Reply #3 on:
August 01, 2013, 03:18:19 AM »
Hi,
the the solution is the following:
add as the very first action of you gui state an action "Set Event Target", to target your fsm that will handle the action ( likely, you will need to split your current fsm)
then the action you fire inside the gui repeat button, will not make the state goes inactive since the vent will fire in another fsm.
does that make sense?
bye,
Jean
Logged
lurig33
Playmaker Newbie
Posts: 3
Re: Beginner: How to use the GUILayout Repeat Button
«
Reply #4 on:
August 01, 2013, 06:05:29 AM »
Hi Jean,
Thank you very much for your help, now it works!!
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
(Moderator:
600
) »
Beginner: How to use the GUILayout Repeat Button