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

Pages: [1] 2 3 ... 5
1
Share New Actions / Restart Sequence Events
« on: October 12, 2017, 05:38:18 PM »
Pretty simple script, if you want to reset the sequence event, you set the bool to true. I am not sure if something like this exists but I needed to restart a sequence if a condition happened.

Has the option to restart a sequence.

2
Playmaker Help / FsmEvent vs Event for EventTypes on Unity
« on: July 13, 2017, 10:11:08 AM »
I was wondering what is the equivelant of Event.current.type == EventType.Repaint for playmaker? Since regular unity events can't be used.

Thanks!

3
User Showcase / Oculus Touch Playmaker - Toolkit [Asset]
« on: June 13, 2017, 03:22:30 PM »
Oculus Touch Playmaker Toolkit

The second toolkit that matches the Steam VR Playmaker toolkit. This is the complete package for all Touch actions and needs. It was designed for simplicity and ease to jump in and get started right away without a need to read a manual (even though it comes with one!)


Unity Store

Important: requires playmaker version 1.8.1 or greater!
Important: requires OVR!

Features

-Extensive Custom Actions
-Demonstration Scene
-Full Documentation
-Detailed FSM and Actions
-Custom Models


Example Scene demonstrates how to use the most popular Oculus VR scripts in custom actions.

-Finger Detection.
-Guiding third person character.
-Throw Objects.
-Set up a shooting weapon.
-A boxing machine that allows you to test your speed.
-Firing targets.
-Rumble Controllers.
-Switching between controllers.
-Dual wielding Guns or Boxing gloves.

http://www.frametalestudios.com/oculus-playmaker-toolkit

Any questions or comments, please post here or send an email to frametaleinfo@gmail.com with subject line "Oculus Playmaker vr Toolkit"

4
VR Help / Oculus Touch Playmaker toolkit done, would like testers!
« on: April 17, 2017, 02:09:18 PM »
I made a slew of scripts that I plan to release to the store but for my Oculus version of the steam playmaker toolkit, but I would like to see if anyone would like the package to test it before launching? I would like to see if it has all the actions necessary for your title.

5
Playmaker Help / Quaternion Look Rotation: Please Fix
« on: August 25, 2016, 01:12:41 PM »
The .isNone is on the wrong one in the quaternion script.

Code: [Select]
if (upVector.IsNone)
{
               
result.Value = Quaternion.LookRotation(direction.Value,upVector.Value);
}else{
result.Value = Quaternion.LookRotation(direction.Value );
}

Currently its like this but it should be reversed, I had to make a new Quaternion script to fix this but it would be much better if this was working in the official release as to not have to rely on having to fix it every time on import.

Thanks!

6
VR Help / Steam VR Playmaker Toolkit - Help Board [VIVE]
« on: August 01, 2016, 02:26:13 PM »
To differentiate from the news and updates section, if you need any help on the asset or have any questions please ask here. Others can possibly benefit from the help as well.

Video installing steam vr playmaker toolkit.


Thanks!

7
The inputs are missing from Run FSM, so I can't set any local variables for the FSM. Is there a new way to do this since 1.8?

Thanks!

8
Share New Actions / Audio Play Random
« on: July 28, 2016, 01:18:22 PM »
There are a couple of scripts for a one shot audio clip and here is a random script for Audio Sources!

9
Share New Actions / String Remove - Used for scoreboards
« on: July 24, 2016, 06:28:16 AM »
I couldn't find a script like this and its pretty easy, it just removes from the position you want and the number of characters you want it to remove.

I am currently using this to get each character in a string to be able to animate each of them individually based on the player input. I then remove that first letter and loop to the next one. Maybe there is another way but this is just one of them!

10
Feature Requests / Rename States
« on: June 12, 2016, 01:50:24 PM »
In most programs there is a script to replace a word or phrase with another one, this would be great when copying a bunch of frames to rename them.

11
User Showcase / Steam VR Playmaker Toolkit [Asset]
« on: June 03, 2016, 06:41:53 PM »
First asset now in the asset store! I am using it for my games right now and if I ever need a new custom script I will add it right away to the asset to continue building a good base. There will also be more tutorials coming soon.

Steam VR Playmaker Toolkit

Aside from the custom actions that come with the package it includes a complete demo package that best shows the scripts in use with a boxing demo, shooting demo, switching between controllers, and more.


Unity Store

Example Scene (Steam VR required)

Important: requires playmaker version 1.8.1 or greater!

Features

-Extensive Custom Actions
-Demonstration Scene
-Full Documentation
-Detailed FSM and Actions
-Custom Models

Example Scene demonstrates how to use the most popular Steam VR scripts in custom actions.


-Throw Objects.
-Set up a shooting weapon.
-A boxing machine that allows you to test your speed.
-Firing targets.
-Rumble Controllers.
-Switching between controllers.
-Dual wielding Guns or Boxing gloves.

http://www.frametalestudios.com/#!steamvrplaymaker/d9jrt

Any questions or comments, please post here or send an email to frametaleinfo@gmail.com with subject line "playmaker vr Toolkit"

12
Share New Actions / Tk2d Sprite Set Color To Children
« on: August 26, 2015, 01:06:07 PM »
Based on the script of setting material color to children here is a the same but setting all sprites to a color.

When finished it will fire off a finish so you can use the finished event.

Code: [Select]
// (c) Copyright HutongGames, LLC 2010-2012. All rights reserved.

using UnityEngine;
using System.Collections;

namespace HutongGames.PlayMaker.Actions
{
    [ActionCategory("2D Toolkit/Sprite")]
    [Tooltip("Set the color of a sprite. \nNOTE: The Game Object must have a tk2dBaseSprite or derived component attached ( tk2dSprite, tk2dAnimatedSprite)")]
    public class Tk2dSpriteSetColorToChildren : FsmStateAction
    {
        [RequiredField]
        [Tooltip("The Game Object to work with. NOTE: The Game Object must have a tk2dBaseSprite or derived component attached ( tk2dSprite, tk2dAnimatedSprite).")]
 
        public FsmOwnerDefault gameObject;

        [Tooltip("The color")]
        [UIHint(UIHint.FsmColor)]
        public FsmColor color;

        [ActionSection("")]

        [Tooltip("Repeat every frame.")]

        private Hashtable _originalColors;
        private tk2dBaseSprite _sprite;

        private void _getSprite()
        {
            GameObject go = Fsm.GetOwnerDefaultTarget(gameObject);
            if (go == null)
            {
                return;
            }

            _sprite = go.GetComponent<tk2dBaseSprite>();
        }


        public override void Reset()
        {
            gameObject = null;
            color = null;
        }

        public override void OnEnter()
        {
            _getSprite();
            GameObject go = Fsm.GetOwnerDefaultTarget(gameObject);
            ApplyColorToHierarchy(go.transform);

        }

        public override void OnUpdate()
        {
            GameObject go = Fsm.GetOwnerDefaultTarget(gameObject);
            ApplyColorToHierarchy(go.transform);
        }

        void ApplyColorToHierarchy(Transform parent)
        {
            DoSetSpriteColor(parent.gameObject);

            for (int i = 0; i < parent.childCount; i++)
            {
                ApplyColorToHierarchy(parent.GetChild(i));
                if(i == parent.childCount - 1)
                    {
                        Finish();
                    }
            }
        }

        void DoSetSpriteColor(GameObject go)
        {
            _sprite = go.GetComponent<tk2dBaseSprite>();
            if (_sprite == null)
            {
                LogWarning("Missing tk2dBaseSprite component");
                return;
            }

            if (_sprite.color != color.Value)
            {
                _sprite.color = color.Value;
            }
        }


    }
}

13
Share New Actions / Get Transform Distance
« on: August 26, 2015, 12:18:53 PM »
Really useful script for getting the distance between two objects in either its Vector 3, X, Y, or Z

You can also get the negative distance if the object is behind or in front of the target. I use it a ton so get it while its hot!

Code: [Select]
// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.

using UnityEngine;

namespace HutongGames.PlayMaker.Actions
{
    [ActionCategory(ActionCategory.GameObject)]
    [Tooltip("Gets the distance based on the Transform Values.")]
    public class GetTransformDistance : FsmStateAction
    {

        [RequiredField]
        public FsmOwnerDefault gameObject;
        [RequiredField]
        public FsmGameObject target;


        public enum distanceSelect
        {
            Vector3Distance,
            xDistance,
            yDistance,
            zDistance,
        };
        public distanceSelect selectDistanceType;
        [Tooltip("Gets a negative and positive values depending on the transform position.")]
        public FsmBool getNegative;
        [RequiredField]
        [UIHint(UIHint.Variable)]
        public FsmFloat storeResult;
        public bool everyFrame;

        public override void Reset()
        {
            gameObject = null;
            target = null;
            getNegative = null;
            storeResult = null;
            everyFrame = true;
        }

        public override void OnEnter()
        {
            DoGetDistance();

            if (!everyFrame)
                Finish();
        }
        public override void OnUpdate()
        {
            DoGetDistance();
        }

        void DoGetDistance()
        {
            GameObject go = gameObject.OwnerOption == OwnerDefaultOption.UseOwner ? Owner : gameObject.GameObject.Value;

            if (go == null || target.Value == null || storeResult == null)
                return;
            switch (selectDistanceType)
            {
                case distanceSelect.Vector3Distance:
                    if (getNegative.Value == true)
                    {
                        var position = go.transform.position;
                        var newPos = target.Value.transform.TransformPoint(position);
                        storeResult.Value = (newPos.x + newPos.y + newPos.z);
                    }
                    else
                    {

                        storeResult.Value = Vector3.Distance(go.transform.position, target.Value.transform.position);
                    }
                    break;

                case distanceSelect.xDistance:
                    if (getNegative.Value == true)
                    {
                        var position = go.transform.position;
                        var newX = target.Value.transform.TransformPoint(position);
                        storeResult.Value = newX.x;
                    }
                    else
                    {
                        storeResult.Value = Mathf.Abs(go.transform.position.x - target.Value.transform.position.x);
                    }
                    break;

                case distanceSelect.yDistance:
                    if (getNegative.Value == true)
                    {
                        var position = go.transform.position;
                        var newY = target.Value.transform.TransformPoint(position);
                        storeResult.Value = newY.y;
                    }
                    else
                    {
                        storeResult.Value = Mathf.Abs(go.transform.position.y - target.Value.transform.position.y);
                    }
                    break;

                case distanceSelect.zDistance:
                    if (getNegative.Value == true)
                    {
                        var position = go.transform.position;
                        var newZ = target.Value.transform.TransformPoint(position);
                        storeResult.Value = newZ.z;
                    }
                    else
                    {
                        storeResult.Value = Mathf.Abs(go.transform.position.z - target.Value.transform.position.z);
                    }
                    break;
               
            }

        }
    }
}

14
Playmaker Bug Reporting / Get FSM Game Object has a small delay?
« on: August 26, 2015, 10:55:05 AM »
I have a fairly large scene and when I use get fsm gameobject with a finished event it usually does not get the game object. I have to wait a second in the state for it to grab the object as if the action has a delay.

What's going on here? Anyone dealing with this issue?

15
Share New Actions / Tk 2D play animation with Custom Events
« on: August 20, 2015, 08:55:27 AM »
A real nifty custom action for all the TK 2D users. This will let you shoot out events to a specific object of your choosing.

I set the events to string instead of event so that you can write your own and I was going to add both but I figured it would look less cluttered and its simple just to write it. Really handy for firing in one fsm and triggering in another. Just replace it with your current one.


Pages: [1] 2 3 ... 5