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

Pages: [1]
1
This happened right after updating to 1.3.
This error happens at every editor frame update when a game object having an FSM is selected.
It's always caused by FsmState.get_Actions which is called by PlayMaker.Fsm.OnDrawGizmos

Please fix this because if not I will be stuck remaking all the FSMs in my game. Thanks

2
I've coded an Editor script that will display popups based on the types of variables that a script will need to access from Playmaker's global variables. The script is able to modify a Playmaker's global variable value directly(in the inspector) without having to go in the global variable screen.

This is based on Attributes, Reflection and LINQ. It works great. Now we're using Playmaker's global variables as a repository for game wide data.

I've also done this for scripts that need to call an FSM's events. This reduces errors when choosing the event to fire.

We're not coding our own specific scripts for every FSM state but depending on the speed of our game on iOS we may have to do it at some point if our game is too slow.

3
Playmaker Help / Having a disabled FSM pause on its current state
« on: October 14, 2011, 10:57:34 AM »
Hi,

I was wondering if it was possible to disable an FSM but keep its current state paused. I'm asking this in order to have the least updates running at the same time. Since we have controlled environments in our game, I'd like to be able to disable FSMs when the player goes from an area to another.

Re-enabling an FSM is also needed (resuming its state as when it's paused). I tried disabling an FSM but when it is disabled while in the middle of a state, it will be messed up when it is re-enabled again.

For example, I have enemies that need to turn around 180 degrees when they collide with objects/ other enemies (I'm using float animations and/or iTweens). If I disable their FSM when the rotation isn't finished, they will walk side ways when the FSM is resumed.

Right now my current solution is to have an event to which all states will respond, but only after they're completed. Then the FSM will disable itself in a state where it will get back to normal when it is re-enabled. This makes for complicated FSMs. Is there a better solution for this?

4
When I choose to send an event to a gameObject with the new "Send Event" action, all events are displayed in the event list. I have only 10 global events, there are more than 100 in the list.

5
I always have the Playmaker Edit Tool window open. Whenever I load a different scene, I get this error in a loop in Unity's log.

ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
System.Collections.Generic.List`1[HutongGames.PlayMaker.FsmEventTarget].get_Item (Int32 index)
HutongGames.PlayMaker.ActionData.LoadActionField (System.Object obj, System.Reflection.FieldInfo field, Int32 paramIndex)
HutongGames.PlayMaker.ActionData.CreateAction (HutongGames.PlayMaker.FsmState state, Int32 actionIndex)
HutongGames.PlayMaker.ActionData.LoadActions (HutongGames.PlayMaker.FsmState state)
HutongGames.PlayMaker.FsmState.get_Actions ()
HutongGames.PlayMakerEditor.FsmErrorChecker.DoCheckFsmForErrors (HutongGames.PlayMaker.Fsm fsm)


I also have a scene that was working fine before 1.2. Now I get this whenever I try to edit an FSM with this scene opened, this is logged at every editor update:

ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
System.Collections.Generic.List`1[HutongGames.PlayMaker.FsmEventTarget].get_Item (Int32 index)
HutongGames.PlayMaker.ActionData.LoadActionField (System.Object obj, System.Reflection.FieldInfo field, Int32 paramIndex)
HutongGames.PlayMaker.ActionData.CreateAction (HutongGames.PlayMaker.FsmState state, Int32 actionIndex)
HutongGames.PlayMaker.ActionData.LoadActions (HutongGames.PlayMaker.FsmState state)
HutongGames.PlayMaker.FsmState.LoadActions ()
HutongGames.PlayMaker.Fsm.Init ()
HutongGames.PlayMaker.Fsm.Reinitialize ()
HutongGames.PlayMakerEditor.FsmEditor.Reinitialize ()
HutongGames.PlayMakerEditor.FsmEditor.Update ()
FsmEditorWindow.Update () (at Assets/PlayMaker/Editor/FsmEditorWindow.cs:233)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj)
UnityEditor.HostView.Invoke (System.String methodName)
UnityEditor.HostView.SendUpdate ()
UnityEditor.EditorApplication.Internal_CallUpdateFunctions ()


This happens even if I edit prefabs from the Project view. If I create a new scene and instantiate my prefab and edit the FSM, I don't get this error.

I tried to check the code and fix it, but it's in a DLL.  :(

6
Playmaker Bug Reporting / Vector3Normalized 1.1 BUG [FIXED]
« on: July 23, 2011, 12:49:51 PM »
I've just checked and the normalization of a vector does not take place. The Vector3Normalize action doesn't normalize a vector as it should.

I've replaced the faulty line with an assignation an now it works fine.

This works fine:
Code: [Select]
vector3Variable.Value = vector3Variable.Value.normalized;
However this does not :
Code: [Select]
vector3Variable.Value.Normalize();
You can validate this by showing the vector's value with a Debug.Log() call. If the components are over 1 then it doesn't normalize.

7
Playmaker Help / Adding a delay before an action
« on: June 23, 2011, 11:07:35 AM »
I'm coding a custom action tailored to my game. My problem is that when entering a state, my FSM has to wait a certain amount of time before doing this custom action. At the same time the state is playing an animation that will generate an event getting the FSM to a new state.

I've tried using a coroutine but unfortunately it doesn't work in an FSM. My custom action works fine but it can only be triggered at the beginning of the state. Is it possible to implement a delay before this action? Do I need to split the animation and the state in 2 to get it working? Is there a simple solution to that because coding seems easier in this situation. Thanks

Pages: [1]