playMaker

Author Topic: Custom events  (Read 601 times)

vambier

  • Playmaker Newbie
  • *
  • Posts: 2
  • Get Psyched!
Custom events
« on: March 11, 2021, 09:17:12 AM »
Hi, first time user here. I want to start using playmaker because the logic in larger levels is getting a bit cluttered when mostly using C#. I have a programming background(C++) and am also familiar with playmaker like tooling.

I was trying something simple: I have an object in my scene which has a C# script and in that script I have some events defined like so:

Code: [Select]
public event System.EventHandler <CustemEventArgs> CustomEvent;
Now the events work, that's not the problem. But I was trying to see if I could add my own event (CustomEvent) to the state in the fsm that is attached to that object. But when I look in the event browser I don't see my events from that script.

I've been searching but couldn't find any information about that, I did find a lot about custom actions, but not events. Or is that something that needs to be defined in the custom actions?

vambier

  • Playmaker Newbie
  • *
  • Posts: 2
  • Get Psyched!
Re: Custom events
« Reply #1 on: March 13, 2021, 10:47:21 AM »
Noone? I can't imagine being the only one wanting to use custom events this way. I can't use Playmaker without it.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Custom events
« Reply #2 on: March 13, 2021, 06:25:47 PM »
Hi.
you probably need to make a custom action as on the <CustemEventArgs> you can't use a variable.

Have a look at the Playmaker API