Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: Orjax 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. ;D ;D ;D :) :) :) :D
-
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.
-
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.
-
Hi, you can use a bool test, when the screwdrives has a bit set the variable to true.
Here is a sample :
(https://preview.ibb.co/f10mQk/Capture.png) (https://ibb.co/ejq9d5)
;)
-
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. :-)
-
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 :)