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

Pages: 1 2 [3] 4 5 ... 37
I just uploaded some simple animator scripts that might be useful to help you fix/debug this issue- There are scripts to enable/disable root motion in specific animator states

General Discussion / Animator scripts that might be useful to Playmakers
« on: January 29, 2017, 01:29:58 PM »
These are not Playmaker actions but they are simple animator behavior scripts you can add to animator states to help you do some things that are difficult to do with Playmaker alone

Share New Actions / Sharing 49 of my custom actions
« on: January 27, 2017, 01:07:27 PM »
Since went down my custom actions went offline- I added most all of them to github + some new ones here with images and descriptions

I hope they are useful to someone  :) None of them use any third party scripts and all the array actions use Playmaker native arrays.

Share New Actions / Re: Play Random Audio From Array
« on: January 25, 2017, 06:28:14 PM »

PlayMaker Help / Re: Play Sound Workaround Questions...
« on: January 24, 2017, 09:31:51 AM »
No problem Heath  :)

I've really come to love coding even though I'm just a beginner- I've made a ton of Playmaker actions recently- I'll put them online/organize/share them soon as I'm sure some of them would be useful to others.

PlayMaker Help / Re: Play Sound Workaround Questions...
« on: January 23, 2017, 07:55:24 PM »
I attached two actions that I made that might be useful- one plays a random sound from an array and also randomizes the pitch- and another that randomizes the pitch on a single sound-

PlayMaker Help / Re: Inpspector Lag with large FSMs
« on: January 20, 2017, 01:22:28 AM »
Here's one I did on Playmaker arrays- I go over loops in it

PlayMaker Help / Re: Inpspector Lag with large FSMs
« on: January 17, 2017, 09:33:37 PM »
I've got some Fsm's in my current project with probably close to a hundred states in them- I've gotten used to a small loss in UI responsiveness when working with them- don't know if thats the slowdown you are referring too-

I try to avoid fsm's with tons of states now- instead I break them into a number of smaller fsm's that interact with each other using the Get/Set Fsm variable actions- and I try to use loops as much as possible when doing repetitive things- "array/Arraylist get next" actions-

Also I've noticed with Playmaker and other assets with their own interfaces that if you have the interface active when in play mode it slows everything down- so I make sure to deselect the fsm objects when in playmode- and only make the fsm visible/active when debugging-

Share New Actions / Ootii Camera Controller actions
« on: January 17, 2017, 12:19:40 PM »
These are actions for the excellent Camera Controller asset- if you need a good camera controller then give it a look!/content/13768

Here's the actions

PlayMaker Help / Re: Get vector towards another object?
« on: January 16, 2017, 12:41:08 AM »
Subtract one Vector3 from another to get the direction- can use the Vector3 Operator for that then use Vector3Normalize on the direction- then apply the direction as a force etc to move objects towards/away from others-

Can multiply the direction by a float to reverse it/make it stronger/weaker

PlayMaker Help / Re: Inpspector Lag with large FSMs
« on: January 14, 2017, 11:17:43 PM »
Try unchecking "Auto refresh action usage"

Share New Actions / Npc Knockback action
« on: January 14, 2017, 10:17:21 PM »

This action is meant to be used on an Npc to knock it back when its damaged/hit- it works with Npc's that use NavmeshAgent, RigidBody, or CharacterControllers for movement. Just choose the one you want in the popup. It will knock the Npc back in the direction of what it was hit by.

On your projectile or melee weapon- use a cast(raycast, spherecast, etc)- get the hitpoint from the cast and pass it to this action through the "HitPoint" var and the action will do the rest.

Code: [Select]
// by MDS
using UnityEngine;

namespace HutongGames.PlayMaker.Actions
    [Tooltip("Applies knock to a game object using a Rigidbody, NavmeshAgent or Character Controller")]
    public class KnockbackAction : FsmStateAction
        [Tooltip("The object to knockback")]
        public FsmOwnerDefault knockThisBack;
        [Tooltip("Select type- selected component must be present on object or it won't work")]
        public enum objectType {NavMeshAgent,RigidBody,CharacterController }
        public objectType type;
        private Vector3 npcPos;
        [Tooltip("The hitPoint from a cast")]
        public FsmVector3 hitPoint;
        [Tooltip("How far to knock the object back")]
        public FsmFloat knockBackAmount;
        Rigidbody rb;
        NavMeshAgent nav;
        CharacterController cc;

        public bool everyFrame;

        public override void Reset()
            everyFrame = false;

        public override void OnEnter()


            if (!everyFrame)

        public override void OnUpdate()

        void DoKnockBackAction()
            var go = Fsm.GetOwnerDefaultTarget(knockThisBack);
            if (go == null)

            int eValue = (int)type;

                case 0:
                    // navmesh
                    nav = go.GetComponent<NavMeshAgent>();
                    npcPos = go.transform.position;
                    Vector3 direction1 = (npcPos - hitPoint.Value).normalized;
                    direction1 = direction1 * knockBackAmount.Value / 2;
                    direction1 = new Vector3(direction1.x, 0f, direction1.z);

                case 1:
                    // rb
                    rb = go.GetComponent<Rigidbody>();
                    npcPos = go.transform.position;
                    Vector3 direction = (npcPos - hitPoint.Value).normalized;
                    direction = direction * knockBackAmount.Value;
                    direction = new Vector3(direction.x, 0f, direction.z);
                    rb.AddForce(direction, ForceMode.VelocityChange);

                case 2:
                    // cc
                    cc = go.GetComponent<CharacterController>();
                    npcPos = go.transform.position;
                    Vector3 direction2 = (npcPos - hitPoint.Value).normalized;
                    direction2 = direction2 * knockBackAmount.Value * 10f;
                    direction2 = new Vector3(direction2.x, 0f, direction2.z);
                    cc.Move(direction2 * Time.deltaTime);







PlayMaker Help / Re: How to create gears for a boat with Playmaker ?
« on: January 07, 2017, 05:48:18 PM »
Sounds like you need a multiplier-

So for setting your speed float- whenever you set it- multiply it by another float that will act as a multiplier- then you just change the multiplier to set the different speeds- you can change the multiplier float from within that FSM or outside of it as well.

PlayMaker Help / Re: Particle Collision
« on: January 03, 2017, 01:45:01 PM »
Attached the script since snipt is no longer.

PlayMaker Help / Re: Run State If only
« on: January 02, 2017, 12:49:41 PM »
Try the "Game Object Compare" action

Pages: 1 2 [3] 4 5 ... 37