Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Sergey_Russia on March 24, 2019, 05:08:53 PM

Title: Global launch of the FSM event through a separate script [SOLVED]
Post by: Sergey_Russia on March 24, 2019, 05:08:53 PM
Help me please.
Can you give an example of a script that triggers a global FSM event for another object?
I need to trigger a global FSM event from a script that does not belong to this object.
Help me please.
Title: Re: Global launch of the FSM event through a separate script
Post by: Alex Chouls on March 24, 2019, 05:42:25 PM
Does this help:
https://hutonggames.fogbugz.com/f/page?W329
Title: Re: Global launch of the FSM event through a separate script
Post by: Sergey_Russia on March 24, 2019, 05:57:53 PM
Thank you very much!
Title: Re: Global launch of the FSM event through a separate script
Post by: Sergey_Russia on March 24, 2019, 06:30:21 PM
Does not work...
I need to contact FMS directly without adding it to the public domain.
Please see what I am doing wrong ..
 :'(
https://ibb.co/vZFVcp6
Title: Re: Global launch of the FSM event through a separate script
Post by: Alex Chouls on March 24, 2019, 06:58:38 PM
You're using Unity script format inside a C# script.

Use this:
private PlayMakerFSM MyFSM;

I'll add a C# example to that page...

EDIT: I've added a C# example using GetComponent.
Title: Re: Global launch of the FSM event through a separate script
Post by: Sergey_Russia on March 27, 2019, 11:54:08 AM
everything worked out!
Thank you very much.
For your support and for your beautiful product!