hi,
I have a little problem with some actions i'm making to interact with game creator.
I have the following code:
using UnityEngine;
using System.Collections;
using GameCreator.Variables;
using HutongGames.PlayMaker;
namespace HutongGames.PlayMaker.Actions
{
[ActionCategory("Game Creator")]
[Tooltip("Get a GameCreator local bool Variable value to PlayMaker.")]
public class GetGameCreatorLocalBoolValue : FsmStateAction
{
[RequiredField]
//Game Creator object with the local variable
[Tooltip("Game object that contains GameCreator local bool variable.")]
public FsmGameObject gameCreatorObject;
[Tooltip("Look for GameCreator variable bool in game object's children.")]
public bool lookInObjectChildren;
[RequiredField]
//Game Creator name (bool) to import from
[Tooltip("Name of the GameCreator local bool variable")]
public FsmString gcBoolName;
[RequiredField]
//Choose which PlayMaker bool to import value to
[Tooltip("Store the GameCreator bool variable in a Playmaker bool variable")]
public FsmBool StoreValue;
public bool everyFrame;
//Declare float variable
private bool var;
public override void Reset()
{
//Reset
StoreValue = null;
gcBoolName = null;
gameCreatorObject = null;
lookInObjectChildren = false;
everyFrame = false;
}
public override void OnEnter()
{
GetBool();
if (!everyFrame)
{
Finish();
}
}
//Get variable function from Game Creator
public bool GetVariable()
{
object result = VariablesManager.GetLocal(gameCreatorObject.Value, gcBoolName.Value, lookInObjectChildren);
return (bool)result;
}
public override void OnUpdate()
{
//Call get function and save to variable var
GetBool();
}
private void GetBool()
{
if (gameCreatorObject == null) return;
if (StoreValue == null) return;
GetVariable();
var = GetVariable();
StoreValue.Value = var;
}
}
}
everything works just fine, but the action has a little something that is bothering me and I can't get rid of it. The store value should only list the variables, not the tick box, How do I get rid of it? please see the picture attached
any help appreciated,
thanks