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 - jeanfabre

Pages: 1 ... 21 22 [23] 24
331
Playmaker Help / FunctionCall doens't propose vector3
« on: April 13, 2011, 08:06:26 AM »
Hi,

 Got caught by that one in the middle of writing an action.

 If you look at the SendMessage Action. The exposed set of properties to define the method name, and variable to pass if based on FunctionCall but the list of possible fsm variable to pick from doesn't show the vector3 ?!

Is there s logical reason for this? this was just the one I needed... :'(

Bye,

 Jean

332
Share New Actions / application quit
« on: April 13, 2011, 07:24:39 AM »
Hi,

 Just a simple application quit action.


Code: [Select]
using UnityEngine;

namespace HutongGames.PlayMaker.Actions
{
[ActionCategory(ActionCategory.GameLogic)]
[Tooltip("Quit the application")]
public class ApplicationQuit : FsmStateAction
{

public override void OnEnter()
{
Debug.Log("APPLICATION QUIT");
Application.Quit();
Finish();
}
}
}

Bye,

 Jean

333
Feature Requests / playmaker viewer and trial
« on: April 13, 2011, 04:53:48 AM »
Hi,

 We really need a trial system and at least a "player" so that we can distribute examples made with playmaker  easily and securely. It becomes important to spread playmaker around safely.

 Some question in UA and the forum really can be answered with a simple clear playmaker fsm, and remove the need to know much about coding as we all know. Most beginners questions really are about not getting how scripting works, playmaker has a huge role to play here. But at the moment it's just impossible and impractical, because we can't share a project with playmaker safely AND we can't distribute just the fsm as is like in a prefab ( not tested, but assume that would work), because we would force the user opening this project to purchase playmaker before seeing anything. Not good. If we could gently propose a version made with playmaker, they would certainly and most definitly see the potential of it with a clear answer to their problem and they would then buy it next.

 A playmaker "player" that would play and let you view fsm created with the playmaker "editor" would be fantastic!!!


 Bye,

 Jean

334
Feature Requests / limited size for State name.
« on: April 10, 2011, 11:21:38 PM »
Hi,

As I am writing almost plain english codes with Playmaker ( fantastic!), I find very constraining that there is a limit in the length of state's name. Not willing to write a whole paragraph of course, but sometimes to really express the singularity of the state, I have to write less comprehensive and prone to misunderstanding states, and then write the same in the info section, which really is a duplicate of the state name but with two or three more words. This is especially needed since you can't have duplicates so you need to find unique names. I am coming here from a shared project point of view where not just me is looking at this and work is being monitored, and acknowledge by the client which is a developer also. So the more I can properly express myself within the fsm States and events, the better and less obscur my work is. PLaymaker already greatly help towards this ease of comprehension, I just wish I could have longer states name :)


example:

"Load needs to be lifted off the floor" is very close to the max you can write on a state. But sometimes I have to write
"Elevator Jaws engage forward to the delivery location" and that is impossible. Also it doesn't feel to me like such a long Statement, and really helps making the whole fsm more readable as you glance through and follow the process live.


 Could they not wrap onto a second line? I think that it would look quit ok.

 This could maybe part of a bigger plan to allow for visual flexibility in the fsm view.

Have a good day :)

 Jean

335
Feature Requests / broadcast a event from script [implemented]
« on: April 08, 2011, 05:06:05 AM »
Hi,

 It seems that being able to broadcast an event globally to all fsm is not possible from script. I have to have a reference of a fsm component, send an event to it that will eventually broadcast an event to all fsm... not ideal.

 It would be much better to have that available without any fsm reference. It would be a static function of PlayMakerFSM or something like:

PlayMakerFSM.SendEventToAll("EVENTNAME").

 Am I off the map with this? Is it actually possible already? We might be missing a proper api reference isn't it :)

Bye,

 Jean



336
Hi,

 Can't find my way around this one.

 Following the SetEventData.cs I want to send an event from a c# script and populate events data very much like on that action.

problem, I don't have access to myFsmComp.fsm.EventData it only seems to be available from an Action script.

 How can I achieve this. Currently, I have to get the variable directly and set it. This is very wrong from a practice point of view cause I have to hard code variables names and it breaks encapsulation. Hopefully, this is available, and I missed it.

 Bye,

 Jean

337
Hi,

 Very weird one, and getting it everytime ( not tested on v1.1), on mac.

 Step to reproduce:

1: select the state of the START event
2: simply click on the Edit menu of Unity
3: Bang: copy paste command issued. You then get the normal alert "Replace START state?"
4: click yes or no, the copy is anyway effective.

 Bye,

 Jean

338
Hi,

 Very much like the fsm selection drop down in the fsm editor menu, I am wondering why this is not implemented in the action themselves.

 Currently, we need to select a game object, then the fsm. The downside of the current way to access a fsm is that you likely have a lot more gameobjects than fsms. It would be a lot more straigthforward to select directly the fsm from the full list of fsm isn't it? it would keep our mind focused in playmaker "world" instead of wondering "uhm, to what game object that fsm I want to reach is attached, and where is it in the hierarchy?" and then have to find it. Too much... :)


 Bye,

 Jean

339
Hi,

 I find myself willing to drag from a global transition to different State ( mainly during re factoring or new needs), but that doesn't work. This is especially a pain with the START global transition. I have to copy paste, relink, basically becomes a mess if I want to assign a different state to the Start event.

I tried to create a START event and then have an action to trigger that event but that doesn't work neither.

so, if some kind of easier manipulation would be made around this, it would be helpful.

 Bye,

 Jean

340
Feature Requests / debugging and stack tracing
« on: April 07, 2011, 12:04:06 AM »
Hi,

Had a problem just now, and It was difficult to debug because I wasn't able to know what action triggered the transition. I did put a break point on the transition I was interested in, but it's currently not possible to trace back as to how we actually ended up here.

 This is something that would be extremely useful for fast and efficient debug. That is, having the action that triggered the transition hilited somehow.

 Maybe it's possible but I can't find a way to find this kind of information.

Bye,

Jean

341
Share New Actions / FsmBoolTest.cs
« on: April 06, 2011, 10:10:18 PM »
Hi Everyone,

 Posting this as it really speed up my development and saves me duplicating variables all over.

Yes, it's intended to be used only once, no every frame as it will less effective than checking its own local variable in terms of speed, but for some organization, it makes perfect sense. When for example there is a fsm responsible for storing variables for a given process, while other fsm can check against them when needed. Or simply when you can't be bother spending the extra time of creating a duplicate variable, and making the actions to retrieve it, store it and finally check for it.

For convenience, I have created an Unity package, that can be downloaded here: http://dl.dropbox.com/u/17356625/Unity/playmaker/actions/FsmBoolTest.unitypackage

1: have your unity project opened
2: in the menu, select Assets->Import Package->Custom Package
3: locate and select FsmBoolTest.unitypackage on your computer
4: Click Open
5: there is one file, make sure it's selected and import
6: done, you can now access this new action in the "Logic" Action category

 Hope you find it useful,

 Bye,

 Jean


Code: [Select]
// (c) Copyright HutongGames, LLC 2010-2011. All rights reserved.
// Modified by Jean Fabre : contact@fabrejean.net
// this is a combination of BoolTest and GetFsmBool since I don't want the extras steps required otherwise.
// I also don't feel like saving a variable for every single check from other fsm, I want to avoid redundance sometimes.
using UnityEngine;

namespace HutongGames.PlayMaker.Actions
{
[ActionCategory(ActionCategory.Logic)]
[Tooltip("Sends Events based on the value of a Bool Variable from another FSM.")]
public class FsmBoolTest : FsmStateAction
{
[RequiredField]
public FsmOwnerDefault gameObject;
[UIHint(UIHint.FsmName)]
[Tooltip("Optional name of FSM on Game Object")]
public FsmString fsmName;
[RequiredField]
[UIHint(UIHint.FsmBool)]
public FsmString variableName;
[RequiredField]
[UIHint(UIHint.Variable)]

public FsmEvent isTrue;
public FsmEvent isFalse;

public bool everyFrame;

private bool storedValue;

GameObject goLastFrame;
PlayMakerFSM fsm;


public override void Reset()
{
gameObject = null;
fsmName = "";


storedValue = false;
isTrue = null;
isFalse = null;
}

public override void OnEnter()
{
DoGetFsmBool();

Fsm.Event(storedValue ? isTrue : isFalse);

if (!everyFrame)
Finish();
}

public override void OnUpdate()
{
DoGetFsmBool();

Fsm.Event(storedValue ? isTrue : isFalse);
}

void DoGetFsmBool()
{
GameObject go = Fsm.GetOwnerDefaultTarget(gameObject);
if (go == null) return;

// only get the fsm component if go has changed

if (go != goLastFrame)
{
goLastFrame = go;
fsm = ActionHelpers.GetGameObjectFsm(go, fsmName.Value);
}

if (fsm == null) return;

FsmBool fsmBool = fsm.FsmVariables.GetFsmBool(variableName.Value);

if (fsmBool == null) return;

storedValue = fsmBool.Value;
}

}
}

342
Hi,

 As I develop fsms, I build processed that are ready before other parts of the projects are, just because event systems allow that kind of freedom and power.

Now, I wish I could trigger an event by simply right clicking to it and select "trigger" or something. I could easily verify a local process and not have to build junk/testing code or fsm for nothing.

 That would be increasing productivity dramatically.

 Bye,

 Jean

343
Action Requests / FsmBoolTest.cs
« on: April 04, 2011, 05:28:29 AM »
Hi Everyone,

 Posting the custom action that I use the most currently as I build flow charts involving several fsm and central fsm for variable pooling. It saves me several creation steps every time and more importantly prevent having to store duplicate variables all over fsm.

 If you have suggestions, critics or better code for that, it's all welcome!

Hope you'll find it useful :)

 Bye,

 Jean


Code: [Select]
// (c) Copyright HutongGames, LLC 2010-2011. All rights reserved.
// Modified by Jean Fabre : contact@fabrejean.net
// this is a combination of BoolTest and GetFsmBool since I don't want the extras steps required otherwise.
// I also don't feel like saving a variable for every single check from other fsm, I want to avoid redundance sometimes.
using UnityEngine;

namespace HutongGames.PlayMaker.Actions
{
[ActionCategory(ActionCategory.Logic)]
[Tooltip("Sends Events based on the value of a Bool Variable from another FSM.")]
public class FsmBoolTest : FsmStateAction
{
[RequiredField]
public FsmOwnerDefault gameObject;
[UIHint(UIHint.FsmName)]
[Tooltip("Optional name of FSM on Game Object")]
public FsmString fsmName;
[RequiredField]
[UIHint(UIHint.FsmBool)]
public FsmString variableName;
[RequiredField]
[UIHint(UIHint.Variable)]

public FsmEvent isTrue;
public FsmEvent isFalse;

public bool everyFrame;

private bool storedValue;

GameObject goLastFrame;
PlayMakerFSM fsm;


public override void Reset()
{
gameObject = null;
fsmName = "";


storedValue = false;
isTrue = null;
isFalse = null;
}

public override void OnEnter()
{
DoGetFsmBool();

Fsm.Event(storedValue ? isTrue : isFalse);

if (!everyFrame)
Finish();
}

public override void OnUpdate()
{
DoGetFsmBool();

Fsm.Event(storedValue ? isTrue : isFalse);
}

void DoGetFsmBool()
{
GameObject go = Fsm.GetOwnerDefaultTarget(gameObject);
if (go == null) return;

// only get the fsm component if go has changed

if (go != goLastFrame)
{
goLastFrame = go;
fsm = ActionHelpers.GetGameObjectFsm(go, fsmName.Value);
}

if (fsm == null) return;

FsmBool fsmBool = fsm.FsmVariables.GetFsmBool(variableName.Value);

if (fsmBool == null) return;

storedValue = fsmBool.Value;
}

}
}

344
Feature Requests / public private fsm variables
« on: April 04, 2011, 04:12:03 AM »
Hi,

I think it would be good to be able to declare fsm variable as private or public, so that other fsm can or can not see them when setting variables of others. Not only it's a good practice as is, but in the perspective that an ecosystem will emerge with lots of ready made fsm, it will become necessary to guarantee protection just like normal script do as well.

 Bye,

 Jean

345
Feature Requests / State shortcut to avoid links clutter and cross
« on: April 04, 2011, 02:55:20 AM »
Hi,

 It would be good to be able to define shortcuts to existing State in a fsm, so that from transition far apart visually, linking to that state doesn't overlap or cross the drawings. It would have a special visual appearance like dashed or something, and clicking on it would move the view to display the actual State in question.

 Bye,

 Jean

Pages: 1 ... 21 22 [23] 24