Forum rules - please read before posting.

Easily tweak variables at run-time / Modifying the inventory

I'm looking desparately for an option to adjust variables (global and local) at run-time to test certain situations in a scene without having to go to other scenes or in other words: Playing the whole game until a certain point. 

The same with the inventory, is there a way to just "give" the player certain inventory items when the game plays? Otherwise I'd also need to go to different scenes to collect that stuff which in turn may be not so easy because I need to solve another puzzle first - I hope you see where I am heading ;-)

TL; DR - How to manually edit variables / the inventory in editor playmode?

Comments

  • You mean change the value when game running as its unchangable in the variables tab? if so, i think this is in the works, or maybe in the latest version by now. Chris can give more inforation regarding this, im sure i read it was in dev.

    Items: In the inventory tab, you can select item and check carry on start. Doing it while in middle of game, i dont think you can. but would be cool to have :P


  • Yes, the latest version of AC includes Variable Presets.  In the Variables Manager, you can define a preset, and then assign the value of each Variable for that Preset.  You can then bulk-assign all variables to this Preset within the Variables Manager during gameplay.

    To set up Inventory, you can create an ActionList that uses multiple "Inventory: Add or remove" Actions to set up your Inventory in the way you want.  You can then run it manually by clicking "Run" at the top of it's Inspector during gameplay.
  • Thanks for the input, but I guess it's still a bit clunky to use this way. It'll certainly work if there would only be some variables or some inventory items, but I have a project with way over 60 variables and 70 inventory items, and setting up action lists to add them individually to the inventory or creating presets would be way to cumbersome just for doing quick checks if some dialog branches work properly.
    But the API for accessing the variables is really simple so I guess I'll just wrap it into a custom tool :-)

    OT: Didn't knew one can run ActionLists directly from the inspector!
  • Sure - if you're up for some coding, it's very simple!  It's just not always clear who is and who isn't keen on such a solution.
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.