Forum rules - please read before posting.

Request: Popup variable as a parameter type in action list assets

Hi, It's me again! :)

I'm trying to simplify many of my busy actions using the action list assets (ALA), and ran into a problem where I want to be able to set a variable as a parameter.

It's a global variable I want to set from outside the ALA
My global variable DRIVE_showScene, is of type popup, and currently has two potential values TOWN or CITY

I'd like to be able to choose the value of this popup variable from outside the ALA, (with a dropdown ideally of the values in the popup variable as I've mocked up in the image below), but I can't seem to create an ALA parameter of this type?

My question (as usual) is am I misunderstanding the way to use this feature, or is it a limitation of the ALA structure, or is this something that could be added?

As always, thanks in advance
Andi

Comments

  • There is a detachment between parameters and the way in which they're used within Actions. Each parameter variable is unique, with its own set of label values - so creating a PopUp parameter would also have to involve re-defining its labels, and making sure they match the variable you ultimately want to set.

    What you can do, however, is set the value by index. PopUp variable values can be overridden with Integer parameters. So in your case, Town would be set with a value of 0, and City with 1.

    What you then do is write a reminder of these values in the parameter's Description box, i.e. "Town = 0, City = 1". When hovering over the "Show environment" label in the ActionList: Run Action, that description should then show up as a tooltip.

  • This sounds like an interesting work around, I'll give this a shot.

    Thanks!

  • Hi Chris, I think also due to this detachment, I've been unable to use the scene switch action and pass it an integer that is coming from a global variable of type int?

    I don't want to have to retype the int into each instance of the action list asset, I want it to use the global variable I set in a previous scene.

    Is this possible in any way?

  • Define an Integer parameter in your ActionList, and then precede your Scene: Switch Action with an ActionList: Set parameter Action.

    Check Change own?, select the new Integer parameter, and set the New value is field to Copied From Global Variable. You'll then be able to select your Integer global variable, whose value will be transferred to the parameter - which can then be used to override the scene index.

  • FANTASTIC! thanks Chris, this has made my day, and means I can simplify a number of complex action lists now and remove some custom scripts which grabbed global variables and ran actions from scripts instead.

    I must admit learning that custom script workaround has given me great insight into how powerful custom scripts can be though so it wasn't time wasted at all!

    Thanks for the help!

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.