Hey, thank you for your help!
So, the action for writing on this is like this now:
// (c) Copyright Marco E.G. Maltese, No rights reserved.
using UnityEngine;
using System.IO;
using System.Text;
namespace HutongGames.PlayMaker.Actions
{
[ActionCategory(ActionCategory.ScriptControl)]
[Tooltip("Saves a text string to a determined file.")]
public class TextFileWrite : FsmStateAction
{
public FsmOwnerDefault gameObject;
public FsmString pathName;
public FsmString fileText;
public override void Reset()
{
pathName = "";
fileText = "";
}
void writeFile()
{
System.IO.File.WriteAllText(pathName.Value, fileText.Value);
}
}
}
But it's still not working.
I managed to use SEND MESSAGE and write a text file with a Javascript on an object but the problem is that I can only set up a single variable for a function, and I need 2: filename string and text string.
This is why I tried to make this PM action (which could come useful to many users I think).
But I bought PlayMaker exactly because I have no wish to learn C# syntax or .NET hell of documentation, so I really can't go through and find why the hell the file is not being written.
I have seen your example
here where you bridge scripts but this requires 2 scripts to work and looks a bit too cumbersome imho.
On this, why not just read the FSM variables from inside the script? Is it possible?
This way I could use my Javascript reading the FSM variables from inside the script.
But I can't find any documentation about this in PlayMaker.