PlayMaker Feedback > Feature Requests

Fungus Playmaker Integration

<< < (2/3) > >>

jeanfabre:
Hi,

 Are you sure you want to force state transitions? it seems not the right way to go, instead you should have a comprehensive set of custom actions and trigger transitions this way.

 If you have a clear use case, can you explain it and I'll try to come up with the best way to deal with it.

 Bye,

 Jean

Nilihum:
I don't have a Use Case, but what I'm trying to do is create a Fungus command that reads in the name of a state and causes the FSM to transition to that state, either by simply forcing it, simply writing the name to the string to transition to into Playmaker so it can handle it from there, or to have the Fungus block be read in as a program. Forcing it this way might be sufficient but the set of custom actions you're suggesting might be more efficient, what's important is that Fungus does the heavy lifting to do the transition . I'm still learning how to expand upon Playmaker like this so I'm currently stuck on how to get Fungus to write variable values to Playmaker variables.

If you've any suggestions on what custom actions and trigger transitions I could create, it would be of great help.

jeanfabre:
Hi,

 for this, I would strongly recommend you to study the ugui component proxy system which does two things:

-- makes use of public properties dedicacted to create proxies between scripts and PlayMaker hidding away the complexity, so you can visually reference a fsm, an event or an Fsm variable. thats'c for create nice components in the Unity inspector.

-- internally will show you how to access fsm, access fsm variables and set/get them

 Let me know how it goes.

 Bye,

 Jean

Nilihum:
Right, I've managed to trigger state transitions using global events from Fungus by using the code found on https://hutonggames.fogbugz.com/default.asp?W329, but I was wonder if you could help just a little bit more.

The lines that get and set a variable don't seem to do anything for me, and I don't know enough about the Playmaker engine to understand what I'm doing wrong; correct me if I'm wrong, but is this what's happening: a FsmFloat variable called floatVariable is created, and then being made equal to a (presumably preexisting) float called "myFloat" is then made equal to 0.5? Is this suppposed to make myFloat equal to floatVariable as when when you send the event? Because I'm trying to write from Fungus to Playmaker and my code doesn't do that. (Edit: I've attached my script if you want to look at it)

I've decided to not use the uGUI proxy for this because I seem to be able to achieve my desired functionality with it and because that it would be one thing more that the user would need to download in order to run the program and I want to keep those at a minimum, despite this I find the uGui quite promising and would like know more of it's capabilities, is there a tutorial or series that can tell me more about it beyond accessing the FSM and writing variables?

Finally, I have the core functionality done for this project, being able to read and write variables between the two engines, execute blocks from Playmaker, and state transitions using global events, but there's not a lot of code at the end of the day. Is there any functionality you can think of that you'd like to see implemented?

jeanfabre:
Hi,

 FsmXXX variable will only work inside a custom Action for PlayMaker, they won't render nor work as is within a regular Monobehavior.

 The way you want to do this is simply not going to work.

in order to progress here, you need to debug properly:

-- first debug whether FunString was found or not.
-- also, OnEnter might be called to soo and the Fsm wasn't yet initialized and so the fsmString is not found.

 Bye,

 Jean

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version