I've written a custom action, and I want to run a custom ActionList inside of it.What I want is shown below.
ActionList actionList = new ActionList();
actionList.actions.Add(ActionSpeech.CreateNew(KickStarter.player, contentSplit[j]));
actionList.actions.Add(ActionScene.CreateNew_Switch(contentSplit[j], true, true));
actionList.Interact();
But it gets error when running,because of the actionlist isn't asigned any gameobject.
Maybe you have a better idea to achieve it?
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
The ActionList class derives from MonoBehaviour - you must use AddComponent to create a new instance of it, i.e.:
See the included ScriptedActionListExample script's CreateActionList function for an example of how this can be used.
thanks