playMaker

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - KJIB

Pages: [1]
1
We are starting to use a lot of FSMs and it sometimes takes quite a while to find which FSM triggered an event in another FSM. In the events window you can see how many times an event is used. It would be great to expand that and see which FSM/State/Action uses it so we can quickly zoom into what has been set up.

It would also be great to do something similar for method calls (i.e. where a state has an action that uses Send Message to call a method) because I sometimes want to drill down to who is calling a given method.

I am guessing that both of these should be fairly straight forward, can we have them please please please? Or perhaps I'm missing something that's already there (I'm using 1.4.3f5) ?

If you really want to go to town with it you could show all the FSMs with state->events radiating out to the other FSM/states with event lines or something cool & visual. But a small tweak to see where the events are going from the existing event window would be great too.

2
Playmaker Help / Public FSM Events and FSM variables in scripts?
« on: October 12, 2012, 05:02:34 AM »
I can use a string to send a given named (in a string) event but I am trying to set up something that is more reliable than a string to reference FSM stuff.

Why: Because if I, (or someone else), change the event name in Playmaker I really want that name to change in my scripts public inspector area too or I end up with having to find why my app is broken (i.e. because the name of the event I'm using has changed but the instance of the script didn't get its version of the name updated). Same for FSM variables. Also, I'm the only coder on our team so, if it breaks, it's going to eat my time as (most of the time) no-one else knows how to work out what the problem is.

Ideally I'd like the user to be able to drag the FSM to my script AND to then be able to let the user select from the editor events/variables from that FSM to define a reference to it for me to use in the script. (e.g. is there a way for me to get a reference to the name string in Playmaker or something so the string is only held in one place anyway? etc.). If I can't reference the specific FSM then globals would be better than nothing.

At the moment I might have something like this to let the user setup a script that needs to send Playmaker events or do something with a Playmaker variable:
Code: [Select]
public PlaymakerFsm targetFsm;
public string FsmEventNameForBadData;
public string FsmBoolVarNameForResult;

I did try a test using an FsmEvent and setting the name in that structure but this does not reference a specific FSM and when I edited the event name in Playmaker it does not change the name in the instance (as expected since Playmaker presumably has to find it somehow).

How can I reference things in a way so when I edit event/variable names in Playmaker it updates in my script instance references too?

Thanks  :)

3
Playmaker Help / How to control FSM execute order?
« on: September 21, 2012, 09:03:19 AM »
Is there a built in way to determine FSM execute order?

Real example: A couple of us independently ran through tutorial 10 today and found that at the point where you first try to see the colour of a platform being changed it didn't work. The mechanism relies on one start FSM setting up some colours in some globals and a different FSM was meant to pick up these colours & apply them to the game object. Trouble is the FSMs got executed in a different order to that in the tutorial so the platform was set to black (RGBA=0,0,0,0 default I guess) instead of the colour we'd specified. I added a 0.1 second wait timer to the FSM that applies the colour & this fixed the problem (i.e. the other set up FSM now got to do the work it needed before the apply colour FSM continued).

This wait timer solution is not the sort of thing I ideally want us to rely on for predictability. Where'd I go wrong? Or, is there a right way to do this (preferably built in rather than me needing to add more variable/states/checks/waits etc.) and if not, any plans to add control over this important facet of FSM use?

Pages: [1]