Forum rules - please read before posting.

Returning to an Actionlist from code

edited April 2014 in Technical Q&A
I've been diving into the code that makes AC tick, and in addition to custom menu scripting I've figured out how exit out of menus and conversations (using its TurnOff) from code and resuming the Normal gamestate.

What I'm after however is the command that a conversation (or any action, really) uses to return back into the Actionlist it came from. I can't seem to figure out how to trigger that manually.

In the case of a conversation, I hoped that it had something to do with the playerinput.activeconversation, and that setting it to null would somehow kick it out of the dialogue state but that didn't work.

[EDIT] Oh hm I see you can't actually do this from within AC either. When a dialogue option is marked with Stop you can only segue into a cutscene or let it fizzle out on the spot. I guess in that case the command for triggering a cutscene/actionlist is what I need.

For context, I'm making a zoom-in for when I talk to someone, and a zoom-out for when I'm done, similar to how Puzzle Agent does it. Having to only define that once for every character (per scene) would be my goal.


  • Does a simple Camera: Switch not suffice?

    Actions are run from the ActionList they're contained in.  You can't run a "standalone" Action by itself.  Also, ActionLists add themselves to the ActionListManager (which removes them from itself when they finish).  The ActionListManager keeps track of any running ActionLists, so that it knows whether or not to pause gameplay, amongst other things.
  • Okay so it would be possible to 'inject' an actionlist into the actionlistmanager? The reason I ask is because I close some of my menus through code, and from there I can't jump back to an actionlist to trigger a camera switch or whatever I need to happen next. Plus which actionlist that is also differs per scene.
  • You can trigger it simply by running the ActionList's Interact () function - this will handle the ActionListManager as well.

    However, you may want to consider using Constant ID numbers instead.  If you call an InvActionList / MenuActionList (which is scene-independent), you can run a more generic list of actions by referencing the Constant ID of eg your Cameras.  Attach a ConstantID script to your Cameras, set the ID to manual, and then you can type in a number that's shared by all Cameras across your game.  Then, when you call that ID number, it will always choose the Camera - regardless of which scene you are in.
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.
Do NOT follow this link or you will be banned from the site!