Playmaker - Events

hazuki

Member
Hi,

I am looking to fire Playermaker FSM events from UCC events, for examnple, with current implementation, can I trigger an FSM event when a character jumps? Or, can I trigger an FSM event when the UCC character takes damage? Looking through the event documentation I can't see where to start.

Thanks.
 
Search the solution for "ExecuteEvent". These events you can easily intercept. Some are even global... opposed to having to listen to a specific GameObject.
 
Thank you, I am having a lot of difficulty here, basically I don't understand this page: https://opsive.com/support/documentation/ultimate-character-controller/programming-concepts/events/

At the moment I am trying to get the most simple event set up, I have added this event to the character:
1489

Which I thought would send the FSM_Start event to the playmaker FSM in the VOX game object any time the character lands, however it doesn't do anything, the VOX FSM has a state with the global event FSM_Start on it. I'm sorry, I'm not sure I understand "Search the solution for "ExecuteEvent", I tried searching the forum and the dcoumentation but couldn't find much, there doesn't seem to be any tutorials on events on YouTube either.

I think I'm kinda doing this all wrong!
 
From the FSM you can trigger UCC events, but the other direction doesn't work. As @devomage mentioned you can easily create a script that will execute the Playmaker event, but I'm not too sure how to approach a generic solution for this. Ideally you'd just enter the event name that you'd like to listen to and then it'll take care of the rest. The problem with this is that each event requires a specific parameter type so there isn't a way to just subscribe to an event based on the name. So for now the best way is to create a script that hooks up with playmaker's event system.

This page gives a good overview of their event system:


So you could create a new script similar to the script listed at the bottom of the UCC Events page and then call PlaymakerFSM.Event.
 
Cool, I'll give that a go, ideally the functionality would already be there, I do admit, some days I really like working with UCC and other days I totally regret implementing it as I really thought I would be able to use most of the UCC functionality via PlayMaker and not have to get my hands dirty with scripting. I really feel like the PlayMaker integration is super lacking. Sorry to sound negative, but I constantly have to ask myself if I should drop UCC and implement something else more suitable and that's a huge shame as it offers so much but I just can't use most of it.

Also, possibly irelevant disclaimer: I have to take care of running a business, developing mutliple titles, supporting old titles, all artwork, design... basically everything, there's literally no possibility of learning C#. Just to clarify why PlayMaker is so important to my workflow.

Thanks.
 
Just so I'm not barking up the wrong tree, if a link between the two event systems existed then these scenarios would be possible?:

UCC Character Jumps - Sends event to PM FSM on a specific GO or as a global event
UCC Character Lands - Sends event to PM FSM on a specific GO or as a global event
UCC Character Takes Damage- Sends event to PM FSM on a specific GO or as a global event
UCC Character Fire Weapon- Sends event to PM FSM on a specific GO or as a global event
etc etc.
 
You won't be able to go UCC -> Playmaker, but you can go Playmaker -> UCC. I wish that it was possible but I do not know of a generic way to make the integration go from UCC to Playmaker.

For those situations you'll need to create a small script that sends the event. For your situation I recommend going the Unity event system route as you started in the image above. There is a pretty decent tutorial on it at
.
 
For anyone finding this post later on, I didn't manage to get anything working satisfactorily, I hope you have better luck.
 
Top