Forum rules - please read before posting.

Can't use local variables with ActionList Pop Up Switches?

Hi all,

I really like the pop up switches capability when creating ActionLists, but it looks like this only works with global variables. Trying to use a local variable with a pop up switch produces the message:

"local variables can not be used in actionlist assets"

Global variables work fine with pop up switches, but I was trying to use local ones so that it's per scene instead of having a really long list of global variables.

Thanks for any help.

Comments

  • Local variables are stored in the scene's settings, but you're trying to access them from an ActionList asset, which is scene-independent.

    This isn't possible, because the ActionList doesn't have a constant link to the data, since it can be run at any time.

    You can, however, rely on Component variables - which do exist in the scene, but on a specific object. ActionList assets are able to reference them with the Constant ID system.

    To create a Component variable, add the "Variables" logic type from the Scene Manager.

  • Ah, got it, thanks for the explanation Chris, cheers!
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.