playmaker actions

gamesfan 4 years ago updated 4 years ago 5

How do I call a Playmaker Action from Bolt?

i.e. rotate action. I have added the types from Hutong Playmaker:  Rotate, also added the types FsmOwnerDefault, FsmFloat, FsmVector3, 

When I add the CreateRotate() Unit, it appears with no parameters at all,

Note, I have chosen a simple Action just to exemplify my request

Bolt Version:
Unity Version:
Scripting Backend:
.NET Version (API Compatibility Level):

I have never used Playmaker myself but I should be able to help. This creates an instance of the class Rotate. That is it. Same as any other class. You need to drag out the created rotate instance, and edit from it's variables and use its functions. Like this example of my floatTo macro. Which just uses a C# class I created with all the variables and functions for tweening a float using DOTween. Same should apply. You don't need a "Set a reference" though. I use it this way perhaps because of my programming background, and good if you want to use the get command instead of this nodes output everywhere. So just drag out the output you have and edit everything from there. You are editing the new version of that class. It needs to be created first though. A unit with ports is more of a "Function" or method. What you have is creating the instance of the class which contains the functions or the methods. Which is what you want.

*Note, I use programmer language. New is Create.

great thanks! I will give it a try tomorrow 😀 awesome forum!! 

Hi, I tried as you said but I can not get this to work, do you mind sharing your C# function code?

I have downloaded DOTween myself so I can test your code

thanks in advance!

No problem, already have this one in the macro section about a week ago. http://support.ludiq.io/topics/525-floatto-dotween-wrapper/

Has all necessary, just let me know if you have any questions.

Thanks for sharing. I analyzed it and I know now why my flow wasn't working. Playmaker Actions have methods which are private and also they have no parameters.

Also, most of the variables are classes i.e. for float type they use a "FsmFloat" class which has methods and parameters on its own. So, I made a copy of the Playmaker Action script I needed, changed the method attributes, parameters, etc. and made it to work. In short, I think it is not worth it.

I am looking now for a way to call a Playmaker FSM from Bolt, send events and parameters to it and after FSM finishes out then resume Bolt execution. Flowcanvas and Opsive have a way to do that directly as a Unit or Node/State. I think Bolt should have something similar. I will post this new topic in Ideas