Forum rules - please read before posting.

Version 1.51: Music handling, ActionList pausing, Animator saving and event listeners

edited March 2016 in Official news
After the various overhauls that v1.50 brought, this update is one of refinement.  It's important that as AC matures, and games being developed with it get closer to completion, development focuses more on stability than grand features.  Still, there are a number of useful additions here, and updating is recommended for all users.

While I normally write summaries of an update's larger features here, this time I've prepared a new video to showcase them (as well as one or two from updates made since the last video tutorials were made).  Check it out here:

But the key features, in bullet-point summary, are:
  • Ability to pause and resume ActionLists
  • New music handling
  • Scrolling rich text
  • Improved script sheet exporting
  • Event listeners for common functions
  • New 'Remember Animator' save script
New tutorials are also here:
Managing music across scenes
Calling custom events

Big thanks to the testers on this one.  My fingers are crossed this release doesn't warrant quite so many 'a' updates this time..

Finally, this forum now has an official rule page - please take a few moments to read them.


  • edited March 2016
    Upgrade notes
    • The “InputMousePositionDelegate” input delegate now takes the cursor’s locked state as a bool parameter
    • The GameEngine and Persistent prefabs have been updated and must be re-imported
    • Added: Action comments - When using the ActionList Editor window, a comment box can be shown and edited on each Action
    • Added: “ActionList: Pause or resume” Action - use to pause an ActionList and resume it at a later time
    • Added: “ActionList: Set parameter” Action - use to set the value of a single parameter in an ActionList as opposed to all
    • Added: If a scene-based ActionList uses an ActionList asset as it’s Source, the “ActionList Editor” and “Run” buttons are now shown in the Inspector
    • Added: UI improvements to the “Character: Animate” and “Object: Animate” Actions
    • Added: Ability to change the scene’s “On variable change” Cutscene with the “Engine: Change scene setting” Action
    • Added: When using “ActionList: Run” to run an ActionList with parameters, setting the parameter values is optional
    • Added: Warning if the “ActionList: Run” Action is used to run the ActionList the Action is placed in
    • Fixed: Nodes in the ActionList Editor window not tinting properly in Unity 5.3
    • Fixed: Error message in Console when manually running an ActionList in Unity 5.3
    • Fixed: Editor problems if an inappropriate script file is placed in an Actions folder - a descriptive error is instead shown in the Console
    • Fixed: Time not unfreezing when running ActionLists set to “Unfreeze pause menus”
    • Added: “Music: Play music” Action - use to play and queue music track easily across scenes
    • Added: The 'Remember Sound' component now records the current fading effect of a Sound
    • Added: The 'Sound: Change volume' Action can now be used to change a Sound's volume over time
    • Added: “Wait until finish” option to the “Sound: Play” Action
    • Fixed: Sounds not fading when the game is paused even if 'Play when paused?' is checked
    • Added: Rich text tags can be used in scrolling speech text
    • Added: Ability to limit Menus set to appear When Speech Plays to only show when specified characters speak
    • Added: Speech-skipping features will now react to any input named “SkipSpeech”, as well as mouse clicks
    • Added: Ability to set a minimum display duration for speech lines
    • Added: Option to fallback to speech audio and lipsync files in the original language if a translation has no such files
    • Added: Speech ID-merging feature is now available if “Auto-name speech audio files?” option is disabled
    • Changed: If carriage returns separate speech lines, the delay between lines can now be zero seconds
    • Fixed: Manually-assigned Audio clips and Lipsync files becoming unassigned after clicking “Gather text” in the Speech Manager
    • Fixed: “Dialogue: Play speech” Action not always showing full UI under certain circumstances
    • Fixed: Display issues with game text listed in the Speech Manager
    • Fixed: “Dialogue: Play speech” Actions that have multiple line IDs not showing them all in the Action’s UI
    • Fixed: Translation lipsync files placed in subfolders not being read from correct directory
    • Fixed: Speech ID-merging feature not working fully in Unity 5.3
    Script sheets
    • Added: Ability to create and assign 'Speech tags' to ActionLists that store speech, for further filtering options in the Speech Manager
    • Added: Ability to generate script sheets that are limited to lines spoken by a specific character, or lines tagged with a specific label
    • Fixed: Script sheets created for translations not showing the translations of lines in ActionList assets
    • Added: Ability to trigger Conversation dialogue options with defined inputs, as well as numeric keys
    • Fixed: Conversations occasionally ending prematurely if 'Auto-play lone option?' is checked
    • Added: String and PopUp variables are now translatable
    • Added: Character names are now translatable
    • Fixed: Original scene not being reloaded after gathering text in the Speech Manager
    • Fixed: Issue when gathering text in games that have no player prefab defined
    • Fixed: Errors when importing translation files with text covering multiple lines in Windows
    • Added: Ability to prevent Player head-turning to face individual Hotspots
    • Added: Option to not de-select inventory items when “unhandled” Interactions are run
    • Added: Ability to pass the Hotspot clicked on as a GameObject parameter to unhandled Inventory and Cursor interactions
    • Added: Ability to define an Interaction that runs whenever a PickUp object is picked up
    • Added: If the player clicks on a Hotspot in Choose Interaction Then Hotspot mode, they’ll walk to the Walk-to Marker (if defined)
    • Fixed: Hotspot states sometimes saving incorrectly when limited to a particular Camera
    • Fixed: Custom events defined in Highlight Inspector not working in Unity 5.3
    • Added: Inputs defined in Active Inputs and Menus set to appear On Input Key are now included in the Settings Manager’s list of Available inputs
    • Changed: The “InputMousePositionDelegate” input delegate now takes the cursor’s locked state as a bool parameter
    • Fixed: Minor interaction UI issues
    • Added: Option to prevent direct-controlled player movement while Interaction Menus are on
    • Added: If the New Game Wizard is used to create 2D Player, then a Rigidbody2D component is added so that it can detect Triggers
    • Added: Characters animated with Sprites Unity can show a list of all expected standard animations in their Inspectors
    • Added: Ability to halt characters instantly when using the “Stop Moving” method of the “Character: Move” Action
    • Fixed: Issues with “Super accurate movement” option with Direct-controlled Players
    • Fixed: Player prefab not always loading into the scene if is modified in the Editor in Unity 5.3
    • Fixed: Jumping animations for Mecanim-based players not playing correctly when walking or running
    • Added: Performance improvements to 2D pathfinding if 'Character evasion' is set to 'None'
    • Added: Accuracy slider to 2D NavMeshes - lower to improve performance (good for mobile)
    • Added: Spherical Gizmo at Character roots to visualise the range of the “Destination accuracy” setting
    • Added: “is2D” variable to NavigationEngine ScriptableObject, to allow custom navigation scripts to work in Unity 2D mode
  • edited March 2016
    • Added: Ability for Menus to only appear during cutscenes
    • Added: Option for Menus to be clickable during cutscenes, depending on their "Appear type" setting
    • Added: Ability for Unity UI-based Button and Interaction elements to respond to PointerDown event instead of PointerClick
    • Added: Adventure Creator-sourced Menus are now automatically resized if the game’s resolution is changed
    • Fixed: Minor issues when copying Menus and Menu Elements
    • Fixed: Incorrect instructions in Manual regarding animated Unity UI-based Menus
    • Fixed: Issues when clicking on empty slots in InventoryBox elements that are limited by inventory item category
    • Fixed: Sliders set to hold discrete values not being able to reach the maximum value possible
    • Added: Ability to choose the index at which a new Journal page is added when using the "Menu: Change state" Action
    • Added: Ability to remove a page from a Journal with the "Menu: Change state" Action

    Save system
    • Added: Remember Animator save script - attach to Animator components to record their state in save games (Unity 5 only)
    • Added: The Remember Visibility component can be made to save a Sprite Renderer’s colour and alpha
    • Added: Ability to check if a save slot is empty with the “Save: Check” Action
    • Fixed: Unity UI-based Menus being included in save game screenshots
    • Fixed: Main cursor showing under rare circumstances even if “Replace mouse cursor?” is checked
    • Fixed: Minor issues with Hardware Cursor rendering
    • Added: The “Variable: Copy” Action can now be used to transfer a Integer variable’s value to a PopUp variable and vice versa
    • Fixed: Changes made to local variables not always saving in Unity 5.3
    • Added: EventManager component - Contains static events that get called when common tasks occur, such as when speech plays
    • Added: Public function to PlayerCursor script to read the currently-assigned cursor texture
    • Added: Public functions to Hotspot script that trigger Use, Examine and Inventory interactions manually
    • Added: Public functions to MainCamera script to set and release the camera’s focal point in screen-space
    • Added: The AdvGame.RunActionListAsset function can be used to set the value of any integer-based parameter
    • Added: SceneChanger.LoadPreviousScene function
    • Added: Ability to choose which Layers are used to detect wall collisions on a Third-Person GameCamera
    • Fixed: Errors when using a GameCameraThirdPerson with no Target set
    • Added: When a ManagerPackage file is used to mass-assign Manager assets, the number of assets assign is logged in the Console
    • Added:
      Script variables and functions listed in Section 12.7 of the Manual are
      now hyperlinked to their Scripting Guide counterparts
    • Added: The help icons above Inspector components now link to their entries in the Scripting Guide (Unity 5.1 and above)
    • Added: Section to manual covering how to import Adventure Creator minimally
    • Added: “About” toolbar item to show current version installed
    • Added: Save scripts to Component menu
    • Changed: The "Wait cursor" has been renamed to "Cutscene cursor", but serves the same purpose
    • Fixed: Duplicate Sound objects appearing in the same scene under rare circumstances
    • Fixed: Error with Moveable: Check track position Actions that use the “Equal to” condition

    A good weekend to all!

  • :D Thanks Chris !!
  • Looking like a lot of great stuff! Much appreciated.

    I updated from 1.48 though and anyone know what might have completely broken my first person character? It doesn't use its camera or movement even though it seems to all still be assigned.
  • @AdventureFan: Be sure to study the upgrade notes for each release between v1.51 and v1.48 if you haven't already.  If they don't help, post a separate thread with this issue.
  • Wow, didn't expect new tutorials as well. Nice one.
  • Thanks Chris! Very nice work!
  • edited March 2016
    Great update as always! But I think I'll use for another project, not my actual big one... ^_^

    @AdventureFan, I also have problem when upgraded from 1.49 to 1.50i. My player doesn't appear and the first camera wasn't initialized and after some test, I discovered this:

    "I discovered the Menus that causes the problem! 
    In the Elements, I have some Label with the type "Active Save Profile", but when I change that value to "Normal", the game start normally."

    Hope it can help.
  • Thanks a lot Chris! That features sound more than handy and helpfull to me. Also the video you add to show the features is very clear and practical. Amazing work again. And all the little things that do make a big difference. I take it that it doesn't matter if I use Unity 5.3.1 or 5.4?
  • @PurpleShine: Though the beta is public, until 5.4 is official I can't guarantee AC's compatibility.  If you find issues with it though, you know where to post.
  • Wow, those script sheet export and tagging options are brilliant. Very keen to go through my project and put everything into order.

    Thanks for this big update, Chris!
  • edited March 2016
    Thanks for the update Chris! Especially adjusting volume over time is something I can put to immediate use in a project.
  • I appear to be getting a null pointer at this line in AC_Trigger:

    private bool IsObjectCorrect (GameObject obToCheck)
    if (KickStarter.stateHandler.gameState != GameState.Normal || obToCheck == null)//here
  • Version 1.51a:
    • Added: Dynamic width to default HotspotUI prefab
    • Added: The “ActionList: Run” and “ActionList: Set parameter” Actions can now be used to set parameter values on ActionLists linked to asset files
    • Added: Scene-based ActionLists linked to ActionList Asset files can have their parameters synchronised with their source (enabled by default)
    • Changed: The Variable: Set Action now has more options when manipulating PopUp variables
    • Fixed: UI Menus set to Follow Cursor not positioning correctly at screen edges
    • Fixed: Mecanim Player “jump” bool not being set correctly
    • Fixed: Rare issue that causes a Menu to no longer be editable in the Menu Manager
    • Fixed: Hotspots not always responding to double-taps when using Touch Screen input
    • Fixed: Audio Mixer Group volumes not being set correctly in Unity 5.3
    • Fixed: Issue with “ActionList: Run” Action when running asset files
    @radiantboy: Can you post the full error message from the Console?  I need to see the context.  Also, at what point does this error occur?  Right when the game begins or sometime during the scene?
  • Thanks mate, it happens when I go through a trigger that my player falls through on game start.

    NullReferenceException: Object reference not set to an instance of an object
    AC.AC_Trigger.IsObjectCorrect (UnityEngine.GameObject obToCheck) (at Assets/AdventureCreator/Scripts/Logic/AC_Trigger.cs:187)
    AC.AC_Trigger.OnTriggerEnter (UnityEngine.Collider other) (at Assets/AdventureCreator/Scripts/Logic/AC_Trigger.cs:75)

    I cant give much more than that, nothing else toshow, it happens 5 times as my player goes through 5 triggers.,
  • edited March 2016
    @radiantboy: This'll be because the game is not yet set up when the trigger occurs.  I can remove the console error, but generally you'll want to avoid having Triggers interact in the first frame of the game.
  • It was working fine before. Also id not say its the first frame, he falls a bit first. And the triggers dont actually trigger.
  • edited March 2016
    It could be because my custom AC action scripts are now forced to be inherited from "Action" (before they were MonoBehaviour) so Im getting compile errors, strangely it is letting me run, which is maybe the issue. Now that I have made them inherit from Action I no longer have access to some things my scripts were using such as gameObject and transform (and also my GetComponent <ParticleSystem>() fails) , is there any way to get access to these? I presume you have just enforced that these need to inherit Action or maybe Unity did it.
  • edited April 2016
    Version 1.51b:
    • Added: Ability to filter Menus by name in the Menu Manager
    • Fixed: “Engine: Change scene setting” Action not assigning TintMap parameter correctly
    • Fixed: “Sound: Play music” Action not always working if looping music is already playing 4866
    • Fixed: Issue with “Input: Check” Action’s click/tap detection
    • Fixed: Hotspot clicks taking precedence over Menu clicks in v1.51
    @radiantboy: Custom Actions are a totally separate issue - could we move this to a new thread?  Actions are derived from ScriptableObject, not Monobehaviour - so can't access transform/gameobject/etc by design.  If you want to access a MonoBehaviour from an Action, you can create a reference to it within the Action itself.  See the provided ActionTemplate.cs class for a breakdown on how the script works.
  • One thing I've noticed with this release is inconsistency with hotspot/highlight display with the walking dead style of hotspot interaction.

    I've discovered a few hotspots in my game that are now acting erratically.  It will highlight just fine, however, when I click on it to open up the interaction ring, it just blinks and the ring doesn't show up.  Sometimes if I walk outside of the perimeter of my trigger sphere and walk back to the hotspot, the ring will blink into existence.

    What's interesting is if I remove the highlight from that object, the interaction works just fine...but now the object doesn't highlight.
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.