Forum rules - please read before posting.

ActionList capacity, one file, running from script

Hi Chris,
Im wondering if there will be an issue /problem with my approach to using ActionList,

AC is great and more and more i integrate my code with it, so for running Actions I figured out that great way to have tidy files and all i one place, I use one Actionlist file with 140 Action by now, some of them are connected some are just one Action, and i call for script appropriate Action number and it runs as normal, so:

1. Is this approach correct?
2. When can be performance issues with this one file?
3. I have this ActionList connected to my game controller as Cutscene script then from script i call it by:
AC.AdvGame.RunActionListAsset(this.GetComponent<Cutscene>().assetFile, 39, true);
is it correct? and if theres better way to point this asset file in code?

Of course i use lots of Action list files that get run by AC, but with running Actions form script i mainly use one file, what do you think?

Comments

  • There's nothing technically wrong with that approach, though an easier way to run an ActionList asset file is to just call it's own RunFromIndex function:

    myActionListAsset.RunFromIndex (39);

    Is equivalent to:

    AdvGame.RunActionListAsset (myActionListAsset, 39, true);

    However, when an ActionList asset runs, it must first "download" itself into the scene by having it converted to a Cutscene.  This means that all of its Actions are copied, even if not all of them are going to be run for that instance.

    You might get a performance spike at that moment, but whether its visible depends on how many Actions, the speed of the platform, etc so it's hard to judge whether its an issue or not.
  • Ok, thx.

    Another thing related to ActionList, then if you say to run from file like

    public ActionListAsset myActionListAsset;
    myActionListAsset.RunFromIndex (39);

    with assigning that actionlist file or

    ActionListAsset actList = (ActionListAsset)Resources.Load("myActionListFile");
    AdvGame.RunActionListAsset(actList);

    if there are dialogues in that ActionList, using Menu Speech/Gather Text does not gather this dialoques,
    and if I refer this ActionList file in Cutscene component of some object it does gather dialogues?
    Whats the proper way using ActionList only from script?

  • AC will only include ActionList assets that are specifically mentioned by your Managers and scene-based ActionLists.  This is to prevent unwanted (e.g. demo) assets from being included inadvertently.

    To have an ActionList asset included that you call through script, just create a Cutscene in a scene, and make an ActionList: Run Action that refers to that asset.  The Cutscene itself will never be run, so it doesn't matter if the Action is connected to anything else - it just being referred to in the scene will be enough to have it listed in the Speech Manager.
  • ok great thx, so this is how i did it intuitively in first place and mentioned it in first post
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.