playMaker

Author Topic: Global launch of the FSM event through a separate script [SOLVED]  (Read 1373 times)

Sergey_Russia

  • Playmaker Newbie
  • *
  • Posts: 18
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.
« Last Edit: March 27, 2019, 01:28:13 PM by Alex Chouls »

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn

Sergey_Russia

  • Playmaker Newbie
  • *
  • Posts: 18
Re: Global launch of the FSM event through a separate script
« Reply #2 on: March 24, 2019, 05:57:53 PM »
Thank you very much!

Sergey_Russia

  • Playmaker Newbie
  • *
  • Posts: 18
Re: Global launch of the FSM event through a separate script
« Reply #3 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

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3987
  • Official Playmaker Support
    • LinkedIn
Re: Global launch of the FSM event through a separate script
« Reply #4 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.
« Last Edit: March 24, 2019, 07:30:14 PM by Alex Chouls »

Sergey_Russia

  • Playmaker Newbie
  • *
  • Posts: 18
Re: Global launch of the FSM event through a separate script
« Reply #5 on: March 27, 2019, 11:54:08 AM »
everything worked out!
Thank you very much.
For your support and for your beautiful product!