I have an action list, that when triggered, needs to stop everything else in the game from running (no matter if it's in the middle) and just run itself. How can I achieve this?
(Replacing "ActionList" with "ActionListAsset" if you want to run an ActionListAsset instead).
Then place the script on an object in your scene, and use the Object: Call event Action when you want to run it, calling the script and running the KillAndFun function.
You're referring to the Console? What does it say, exactly?
You need to place it inside the class brackets, not replace the entire file. If you replaced all contents, best to delete it and try again - this time pasting the code beneath the first "{".
It seems like I can't just put this code in a new script component or something... It doesn't recognize what 'Interact' means, nor what 'ActionListAsset' means.
Are you sure you meant for me to just:
1) create an empty game object in the scene I would like to kill all action lists
2) attach a new C# script component to said game object
3) paste the code you wrote inside the class brackets
And then try to call an event?
I can't try to call the event because the console won't let me continue while the error in the pic is still there...
AC uses the "AC" namespace, meaning you have to either prefix any AC class with "AC.", or write "using AC;" at the top of any script that references it.
Comments
Place this inside a new C# script class:
public ActionList myActionList;
void KillAndRun ()
{
myNewActionList.Interact ();
(Replacing "ActionList" with "ActionListAsset" if you want to run an ActionListAsset instead).
Then place the script on an object in your scene, and use the Object: Call event Action when you want to run it, calling the script and running the KillAndFun function.
You need to place it inside the class brackets, not replace the entire file. If you replaced all contents, best to delete it and try again - this time pasting the code beneath the first "{".
public ActionList myActionList;
with:
public AC.ActionList myActionList;
AC uses the "AC" namespace, meaning you have to either prefix any AC class with "AC.", or write "using AC;" at the top of any script that references it.