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:
Playmaker 1.9.1 Released!
Home
Help
Search
Login
Register
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
»
U GUI proxy component, how do I change the event(custom) IN GAME??
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: U GUI proxy component, how do I change the event(custom) IN GAME?? (Read 2057 times)
Orjax
Playmaker Newbie
Posts: 21
Father/son team, self taught, love learning
U GUI proxy component, how do I change the event(custom) IN GAME??
«
on:
May 05, 2017, 12:31:28 AM »
I have a button with U GUI component proxy that works great. But I want to be able to "set property" to change the custom event that is sent. There is no option to change event, or to make it a variable.
I tried adding another U GUI component proxy, then "set property" "enable" false on first one, and true on the second one with a different event.
When played on the editor, the first proxy component gets disabled, and second one enables, but it still sends the same event as the first one.
Any help would be awesome. Thank you to everyone who helps here, I have spent countless hours reading and learning here. SO THANKS.
Logged
djaydino
Administrator
Hero Member
Posts: 7615
Re: U GUI proxy component, how do I change the event(custom) IN GAME??
«
Reply #1 on:
May 05, 2017, 02:32:24 AM »
Hi,
That will not work well, what are you trying to achieve?
Btw you can send events and do other things without using the proxy now:
In the button component click on + in the On Click () part,
then select the object with your fsm (you drag your object in it also),
then click on 'No Fuction' and go to 'playmaker fsm' then you can select 'Send Event'
and type your Event name you want to trigger.
if you want to switch between 2 things maybe you can add a bool test and and a set bool value.
Logged
Join the PlayMaker Discord Channel!
Orjax
Playmaker Newbie
Posts: 21
Father/son team, self taught, love learning
Re: U GUI proxy component, how do I change the event(custom) IN GAME??
«
Reply #2 on:
May 05, 2017, 05:36:38 PM »
I have a button of a screwdriver with no bit. Once combined with bit I want to change the event that it sends.
Game object has several transitions, "screwdriver" "screwdriver with bit" and others. When screwdriver is used I want one message, when "screwdriver with bit" is used I want it to unlock. If the same screwdriver button could send 2 different events based on changes, that's what I want.
Otherwise I will need another button "screwdriver with bit" which I could do, but it takes up one more space in my inventory.
I wish I could set the "event" to a string variable then I could just change the variable. Or if "set property" could change the event, but there is no option for that.
Logged
djaydino
Administrator
Hero Member
Posts: 7615
Re: U GUI proxy component, how do I change the event(custom) IN GAME??
«
Reply #3 on:
May 05, 2017, 06:41:06 PM »
Hi, you can use a bool test, when the screwdrives has a bit set the variable to true.
Here is a sample :
Logged
Join the PlayMaker Discord Channel!
Orjax
Playmaker Newbie
Posts: 21
Father/son team, self taught, love learning
Re: U GUI proxy component, how do I change the event(custom) IN GAME??
«
Reply #4 on:
May 05, 2017, 07:21:40 PM »
simple solution, I should have thought of. Thank you djaydino!
Interesting though, maybe when there is an update, proxy event could be a string variable. Just a thought. Thanks for the easy workaround, I will just have to remember to add the bool test to any other objects that might use the screwdriver also. :-)
Logged
djaydino
Administrator
Hero Member
Posts: 7615
Re: U GUI proxy component, how do I change the event(custom) IN GAME??
«
Reply #5 on:
May 06, 2017, 12:53:46 AM »
Hi,
Actually you only need one.
In the 2 states after the bool test (yes/no)
just add a "send event" on each and you would do just the same what you was trying to do
Logged
Join the PlayMaker Discord Channel!
Print
Pages: [
1
]
Go Up
« previous
next »
Playmaker Forum
»
PlayMaker Help & Tips
»
PlayMaker Help
»
U GUI proxy component, how do I change the event(custom) IN GAME??