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 - Adam Z

Pages: 1 [2] 3 4 5
PlayMaker Help / Possible to start transition from another FSM? [SOLVED]
« on: October 11, 2017, 02:15:10 PM »
I have UI buttons that have a "Play Maker U Gui Component Proxy" attached. I also have an FSM on that button which gets triggered with ON CLICK.

I also have a Game Object with has an FSM on it to Enable and Disable my GUI panels.  Those are enabled/disabled within the different states. As an example; the FSM starts on the Main Menu state. When the "To Single Player" event occurs, it transitions to the Single Player state.

What I'm trying to do is have the button FSM tell the Game Object FSM to transition to a different state, using an Event?  Is that possible? 


PlayMaker Help / How to parent a prefab that gets loaded?
« on: August 25, 2017, 11:21:06 AM »
Im using a 'Create Object' node to load a Prefab. After it gets loaded into my scene, I would like to parent that prefab to another Game Object that's already in the scene.  I tried using the 'Set Paren't node, but that's not working. Any suggestions?


PlayMaker Help / iTween for Hip rotation?
« on: May 03, 2017, 02:22:07 PM »
Anyone have any ideas on how to get more hip rotation out of my generic walk cycle? I was trying different iTween actions with Ping Pong enabled on my hip bone with little success.

Thoughts? Thanks.

PlayMaker Help / Is there a Wait until Variable is populated?
« on: April 27, 2017, 07:59:35 AM »
Is there a way to wait until a variable gets populated before moving on to an event? 

I have a top level FSM Game Object that needs to be chosen by the player. I have a lower level FSM that is using a Get FSM Game Object. Since the top level might take a few moments before the player chooses, I would like the lower level FSM to wait before moving on to an Event. Is there a good node for that?


I'm setting up a simple time-of-day.  I have 2 directional lights, that are facing opposite directions. One is for the sun, and the other the moon. I have 2 states; Sun and Moon.  My Direction Light rotates over time, and when it hits 0 on the X axis, I want it to go to another State. 

Right now I'm using a Float Compare, with Float One as the X rotation of the light that gets updated every frame, and Float 2 is at 0, with a tolerance of 0.1.  When the light rotates to 0 it should transition to the other state, but I get loop count error:
"Loop count exceeded maximum: 1000 Default is 1000. Override in Fsm Inspector."

What am I missing, or is there a better way to set this up? 


PlayMaker Help / Pie or Radial Menu that works with U Gui Component Proxy?
« on: November 22, 2016, 02:59:52 PM »
Does anyone know of a radial or pie menu asset that works with Play Maker U Gui Component Proxy? I just picked up UPie Menu and it doesn't seem to work.


PlayMaker Help / How to create a Raycast Line of Sight system?
« on: October 25, 2016, 08:37:31 AM »
After previous discussions months back, it probably was a good idea to detect if the NPC is close enough to the player AND looking in their field of view before sending a Raycast. If so, then shoot a Ray at the player to see if there are any obstacles in the way. Sebaslive suggested:

"taken from the unity answers:

You want to calculate the direction between the enemy and the player, get the forward vector of the enemy, and then use Vector3.Angle to calculate the angle.

Then you can check if the angle is less than whatever angle you want to be the enemy's field of vision (eg: a 20 degree cone, for instance), and if it is, then the player is in that enemy's field of vision.
so in playmaker terms, use the vector3 operator, set up two vector 3 variables and set it to Angle. Get the players vector3 and if it is in that range you use "You can Store Magnitude in Get Axis Vector and use Float Compare on that..."

and that is another way to do it!"

My Raycast works fine by creating an empty Game Object, parenting that to NPC, and adding a Look At, Raycast, and Game Object Compare Tag to determine whether the Ray hit the Player or another object such as a wall, then sending the result to an Event.

The problem I'm having is figuring out the Line of Sight like Sebaslive suggested.  I have a state prior to the Raycast State that Gets Position of both the NPC and Player. That gets inputted into the Vector3 Operator. I set the Operation to Angle, but I'm not sure what I need to do next. I can use a Float Compare, but that will still allow for detection if the Player is behind the NPC.  Maybe there's a better way to do it?

Any help would be appreciated. Thanks!

PlayMaker Help / How to move a game relative to the direction of another?
« on: October 19, 2016, 07:58:58 AM »
I have a two bone system; bone A and B.  Based on the direction bone A is facing, I would like to move bone B's position. So if bone A begins to face down, bone B moves away from A a certain distance. If bone A faces up, bone B moves closer to A.  Any thoughts on how to achieve this?  Thanks.

It seems that I need to use a Vector Rotation with the iTween Rotate To.  Is there  way I can break up the rotations of XYZ, and then input that into the Vector3 variable before the iTween begins?  What I'm trying to accomplish is to only have one of those rotations fixed at 0, and the other two flexible and pulled from variables.  I'd like to use iTween for the Ease Type.


PlayMaker Help / Help with slider float control
« on: September 23, 2016, 12:00:26 PM »
I have a slider that controls a morph target. I would like to move an object on the x-axis from 0 to 0.078 using the same slider, so when the slider is at 100 the object is at 0.078.

I used a Float Lerp, then a Float Divide by 1257, every frame for both. Then used that float to move the position of the object along the x-axis, every frame.

Any thoughts on how else to do this? Thanks.

PlayMaker Help / Xbox 360 controller D Pad setup?
« on: September 14, 2016, 05:47:43 PM »
I want to use 'Get key Down', but what do I assign it in the 'Key' dropdown to use the D-Pad (7th Axis)?  Thanks.

PlayMaker Help / Change Cameras FOV with iTween or something similar?
« on: September 09, 2016, 08:48:19 AM »
Is there a way I can change the field of view of the camera over time? Ideally I would like it to have an ease-in, similar to iTween.


PlayMaker Help / Multiple Slider problem
« on: September 02, 2016, 06:44:46 PM »
I have two horizontal sliders and each are set up to a different float variable.  They both display on screen when playing my scene, but only the top one moves. What am I missing?


PlayMaker Help / How to enable/disable an action from another FSM?
« on: March 16, 2016, 10:47:32 AM »
I have a Movement FSM and on my Movement State within I have a Mouse Look Action.  On another FSM I have a button with two States. Within one of these States I'd like to enable/disable the Mouse Look Action. is it possible?


PlayMaker Help / Help with CS to add Damp to Convert Bool to Float
« on: March 11, 2016, 12:36:43 PM »
I'm not a programmer, but I need a to add a transition time when using "Convert Bool to Float".  Right now it abruptly changes my float from X to the assigned True Value. I would like it to change over time.  Could someone help with the CS portion please? Then we can share it with others.  Here is all I have:

Code: [Select]

// (c) Copyright HutongGames, LLC 2010-2013. All rights reserved.

using UnityEngine;

namespace HutongGames.PlayMaker.Actions
[Tooltip("Converts a Bool value to a Float value with Dampening.")]
public class ConvertBoolToFloatDamp : FsmStateAction
[Tooltip("The Bool variable to test.")]
public FsmBool boolVariable;

[Tooltip("The Float variable to set based on the Bool variable value.")]
public FsmFloat floatVariable;

[Tooltip("Float value if Bool variable is false.")]
public FsmFloat falseValue;

[Tooltip("Float value if Bool variable is true.")]
public FsmFloat trueValue;

[Tooltip("Repeat every frame. Useful if the Bool variable is changing.")]
public bool everyFrame;

[Tooltip("Optional: The time allowed to parameter to reach the value. Requires everyFrame Checked on")]
public FsmFloat dampTime;

public override void Reset()
boolVariable = null;
floatVariable = null;
falseValue = 0;
trueValue = 1;
everyFrame = false;

public override void OnEnter()

if (!everyFrame)

public override void OnUpdate()

void DoConvertBoolToFloat()
floatVariable.Value = boolVariable.Value ? trueValue.Value : falseValue.Value;


Pages: 1 [2] 3 4 5