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

Pages: [1] 2 3 4
1
General Discussion / Post your playmaker pro training requests here!
« on: April 27, 2017, 01:01:22 PM »
Hello there Playmakers  :)

I create Playmaker tutorials for my Strange School- example here https://www.youtube.com/watch?v=yOZK8yr3IKo&list=PLOtUSn20SlKgvDjLXvLmX55zOIsvgh6x7

I'm going to make some new tutorials covering some advanced Playmaker topics including- hash tables/dictionaries, enums, xml, run fsm, custom actions, programming basics for playmaker-

Please post some topics you want me to include- are there any advanced topics you can't find many examples/tutorials for? Please let me know- thanks.

2
Share New Actions / Flight path action- pathfinding for flying objects
« on: February 27, 2017, 05:55:45 PM »
"flightPathAction.cs"

I just added this action to my Playmaker github actions https://github.com/mdotstrange/MdotsCustomPlaymakerActions


You can use it to do basic flight 3d pathfinding as you can see in this example


The flying object will fly towards/around a target object- you can set it to stop when it reaches a target distance as well-

Here's the rigid body settings the example uses


Hope its useful and have fun  :)

3
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 https://github.com/mdotstrange/animatorScriptsForPlaymakers

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

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

5
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 https://www.assetstore.unity3d.com/en/#!/content/13768

Here's the actions https://github.com/mdotstrange/CameraControllerPlaymakerActions

6
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
{
    [ActionCategory(ActionCategory.Physics)]
    [Tooltip("Applies knock to a game object using a Rigidbody, NavmeshAgent or Character Controller")]
    public class KnockbackAction : FsmStateAction
    {
        [RequiredField]
        [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()
        {


            DoKnockBackAction();

            if (!everyFrame)
            {
                Finish();
            }
        }

        public override void OnUpdate()
        {
            DoKnockBackAction();
        }

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

            int eValue = (int)type;

            switch(eValue)
            {
                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);
                    nav.Move(direction1);
                   

                    break;
                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);

                    break;
                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);

                    break;

            }

           


         


        }


    }
}


7
I just saw that snipt.net is shutting down on Dec 31st
https://blog.snipt.net/snipt-is-closing/

This is where a lot of PMaker users store their custom actions to be made accessible through Ecosystem-

With Snipt shutting down where should we be hosting our custom actions? Github? Gist?

8
Share New Actions / Realistic Fx Action
« on: October 14, 2016, 07:37:04 PM »

With this action you can use/control most all of the prefabs from the three Realistic Fx packs on the asset store by Kripto Fx- they are really nice fx
https://www.assetstore.unity3d.com/en/#!/content/16345

On Ecosystem and Snipt https://snipt.net/raw/cbf8e7cbe511440b6254e89bfef635b3/?nice


9

These are handy for finding the relative position of one game object to another. They store bools and send events.

They are on Ecosystem and Snipt https://snipt.net/mdotstrange/

10
Share New Actions / Play Random Audio From Array
« on: September 28, 2016, 04:27:07 AM »

Will randomly play audio clips from a native Playmaker Array- make sure the array variable type is set to Object- then UnityEngine/AudioClip

I made this to play footsteps in my game- hope its useful  :)

Its on Ecosystem and Snipt https://snipt.net/raw/865df3651da9bd4b42f670f0b44c3462/?nice

11
Share New Actions / Is game object in front of or behind another action
« on: September 01, 2016, 01:09:07 PM »
Used the code from here http://www.habrador.com/tutorials/linear-algebra/1-behind-or-in-front/ to make this simple but handy action-

On Snipt and Ecosysystem as "Is Target in Front or Behind"



https://snipt.net/raw/080ae14d1826ab5563f68ee58dab25e7/?nice

12
Playmaker Tutorials / How to make simple custom Playmaker actions
« on: August 15, 2016, 11:26:51 PM »
Video tutorial on making simple custom Playmaker actions-
https://www.youtube.com/watch?v=U0zm2EVqDBU

The example scripts used in the video are attached to this post

13
Playmaker Bug Reporting / Editor slowdown when PM 1.8.2 editor is active
« on: August 13, 2016, 08:17:18 AM »
I'm using Unity 5.3.6f1 and just upgraded to Playmaker 1.8.2f7

Whenever the Playmaker editor tab is active the whole Unity editor lags- here's a video displaying the behavior https://www.youtube.com/watch?v=GqjDXWXlhYc

When the editor tab is not shown the editor is snappy- as soon at the editor is shown creating objects lags, changing tags/layers lags- it slows down a lot of functions in Unity

I tested it on both Windows and OS X and the slowdown happens on both with the same project- hiding the editor tab gets rid of the problem- I tried disabling all of Pm's debugging/error checking options but the lag is still there-

This slowdown didn't happen in 1.8.1.x with the same project- new empty projects are not affected- so there's something in my project that is causing the lag with 1.8.2.x

I'll just hide the editor when not using it for now- but if anyone has any ideas for other solutions please let me know- thanks!

14
Share New Actions / NavMeshAgent knockback action
« on: July 16, 2016, 09:47:44 AM »
Feed this action the game object that has hit your agent and it will knock the agent back according to the hit object-



On Snipt and ecosystem
https://snipt.net/raw/c20faa081bfa909176e4389d6ddf9063/?nice

15
User Showcase / Flip N Chop
« on: May 31, 2016, 04:08:33 PM »
I just finished a small local multiplayer game called Flip N Chop



You can download and play the game on my itch.io page https://mdotstrange.itch.io/flip-n-chop

Making of article
https://medium.com/@mdotstrange/how-i-flipped-and-chopped-flip-n-chop-edd36da7fa0c#.2sjrctw03

I did a making of article here showing the Fsm's and talking about some of the techniques used to make the game- might be of some interest to Playmaker people  :)

Pages: [1] 2 3 4