playMaker

Author Topic: [CustomAction]How to convert FSM string value to String value?  (Read 2914 times)

bloodymin

  • Playmaker Newbie
  • *
  • Posts: 31
Recently, I learning fun of creating custom action stuff.

But, i faced to one of simple problem. I research on other custom action but i couldn't find answer for it

What i want to do is that wanting to using FSM string value to my custom action.

like drop box, or playmaker's global value stuff.

My custom action is like this
Code: [Select]
using UnityEngine;
using HutongGames.PlayMaker;

[ActionCategory("facebook")]
public class posttext : FsmStateAction
{
#region Fields
[UIHint(UIHint.Variable)]
public string  message;
public FsmString stringVariable;


#endregion
// Code that runs on entering the state.
public override void OnEnter()
{
message = stringVariable ;
FacebookUnityPlugin.PostMessage(message);

Finish();
}


}

But it shows error "FSM string variable can't covert to string value.
Or i tried to use FSM string variable directly on uploading text. then it also showed error " FacebookUnityPlugin.PostMessage can't handle FSM string value stuff. 

How to covert FSM string value to string value. 

izzycoding

  • Playmaker Newbie
  • *
  • Posts: 29
Re: [CustomAction]How to convert FSM string value to String value?
« Reply #1 on: May 22, 2013, 06:59:11 AM »
Hey bud,

you need to use stringVariable.Value to get to the actual string.

Regards,

bloodymin

  • Playmaker Newbie
  • *
  • Posts: 31
Re: [SOLVED]How to convert FSM string value to String value?
« Reply #2 on: May 22, 2013, 11:15:57 AM »
 ;D
THX !!!!!