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.


Messages - Nimred

Pages: [1]
1
Feature Requests / UIHint.TextArea
« on: February 07, 2016, 04:54:04 AM »
I'm using Playmaker as a dialogue editor, with a custom action to open a dialogue text box in my game.

It was a bit annoying to edit the dialogue texts on a single line, so I was happy to find out the existence of UIHint.TextArea.

Unfortunately, when I use it on my string variable, it makes a bigger box but the text still remains on a single line. I can manually add new lines, but over hundreds (thousands?) of dialogue actions, that's going to get crazy.

Would it be possible to have horizontal wrapping on the text field when using UIHint.TextArea, rather than horizontal overflow?

2
Playmaker Help / Arrays with custom class?
« on: January 29, 2016, 03:35:29 AM »
Hi,

In a custom action I'm writing, a callback will be triggered with a custom event type provided by my internal code. For example, callback(MyEventType.ThisHappened).

Depending on this event type, I would like to trigger different FsmEvents, that would have to be defined in an array variable, as an action parameter... For example, { (MyEventType.ThisHappened, onThisHappened), (MyEventType.ThatHappened, onThatHappenedInstead) }

I tried using FsmArray, but I have only been able to make it work with simple Fsm* types; I understand it won't work with non-playmaker types because the variable types are not supported by the UI. But how about a custom class that contains only an FsmEnum and an FsmEvent, which are supported by the UI?

I would like to do something like this:

Code: [Select]
public class EventAssociation
{
    [ObjectType(typeof(MyEventType))]
    FsmEnum internalEventType;
    FsmEvent matchingFsmEvent;
}

[ArrayEditorAttribute(typeof(EventAssociation))]
public FsmArray callbackEvents;

Is there any way to make this work within the playmaker action?

3
Hi there,

I actually took another look at the problem today and noticed that while the "ActiveState" of an FSM cannot be modified, the "StartState" can...

I did a quick test, and successfully jumped to a chosen state in Awake(), without going through the true start state.

Code: [Select]
myFSM.Fsm.StartState = "State 3";
In order to use this for real, I will just make some scripts to regularly save to a file the current states of all ingame FSMs, and possibly also global and local variables, which are also modifiable.

I'm glad there's a solution after all :)


4
Hi,

I just wanted to say that I have pretty much the same need as haikugames. My game uses lots of state machines to drive the story (one per narrative "scene") and when the player takes action and moves the story along, the state changes accordingly.

I need to be able to save which state the player is in, and restore to that state next time the game is started. I tried to set the ActiveState on the Fsm, but unfortunately that's not accessible.

I would also like to be able to set an FSM back to its starting state, without having to call enable/disable. Both problems could possibly be solved if the active state could be changed by script...

I hope you can find time for this soon :)

Michael

Pages: [1]