Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: vambier on March 11, 2021, 09:17:12 AM

Title: Custom events
Post by: vambier 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?
Title: Re: Custom events
Post by: vambier 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.
Title: Re: Custom events
Post by: djaydino 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 (https://hutonggames.fogbugz.com/default.asp?W127)