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

Pages: [1]
1
PlayMaker Help / [Help] Array Contains action doesn't seem to work.
« on: September 23, 2017, 05:03:31 AM »
I'm using the corgi-engine inventory system and I am trying to check the inventory for an object.

I'm using a "Get Property" action on the inventory and storing the result as an object array, then I'm trying to use an "Array Contains" event to check to see if the item is in the array.

I can see that the object is in the array, but the "Array Contains" action is staying false, I"m not sure how else to do this or what is going wrong.

Any ideas?

Thanks in advance.

2
PlayMaker Help / Help with modifying custom action?
« on: January 14, 2017, 10:55:02 AM »
Hi,

I found this action in the forums and it targets the exposure of the procedural skybox. The only problem with it is that it only sets the exposure with a static number and does not have the option of using a variable.

I would like to modify the code to allow for the use of a float variable for the exposure.

I do not know much of anything about code, and though I've been trying to figure this out for hours I've had no luck. Any help would be greatly appreciated.

Here is the code.

Code: [Select]
using UnityEngine;

namespace HutongGames.PlayMaker.Actions
{
[ActionCategory("Skybox")]
[Tooltip("Allows Adjustment of Procedural Skybox")]
public class SkyBoxAdjust : FsmStateAction
{


public Material ProceduralSkyBox;
public bool everyFrame;
public float exposure;

public override void Reset()
{

ProceduralSkyBox = null;
everyFrame = false;

}

public override void OnEnter()
{
if (ProceduralSkyBox != null && exposure != null)
{
ProceduralSkyBox.SetFloat

("_Exposure",exposure);
}

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

public override void OnUpdate()
{
if (ProceduralSkyBox != null && exposure != null)
{
ProceduralSkyBox.SetFloat

("_Exposure",exposure);
}
}

}
}

3
PlayMaker Help / Get Button Down trigger From Joystick axis
« on: May 15, 2015, 04:37:03 AM »
I'm trying to setup a double tap to sprint control for my character, (where one would press forward twice quickly to enable sprint) and it works fine with the keyboard. However it doesn't seem to work for the joystick axis input and I'm not sure how to go about getting an event trigger from the joystick axis.

I tried the Axis Event action but it seems to send events every frame which doesn't allow me to find out if the player has double tapped the joystick, it just keeps firing the event and shoots right into the sprint action.

My layout is like this...

State 1
Get Button Down
    Horizontal Input
        Send Event Moving


State 2
Get Button Down
    Horizontal Input
        Send Event Sprinting

 or

Wait .5 seconds send finished event back to state 1


State 3
Send event to the sprint controller.

******************************

Like I said the FSM works great with the keyboard but I think that's because the A/D Left Arrow/ Right Arrow function as buttons while the joystick works off of a float. So I just can't seem to wrap my head around how to do this with a simple solution.

Suggestions and help in solving this issue would be greatly appreciated.

Pages: [1]