Forum rules - please read before posting.
Tech questions during the weekend? Drop in on the community Discord channel!

Version 1.69 - Tokens, draggable snapping, scripted ActionLists

A wide-ranging update with optimisations, fixes and new features. Key among them:

New token types

Three new text token types:

  • [line:X] - Where X is a translation text ID. Use to insert gathered text in the game's current language into speech text / menu labels etc. Typical use case: re-using lines spoken by the player as a Conversation's dialogue option labels.
  • [compvar:X:Y] - Where X is a Varibles component's ConstantID, and Y is a variable ID. Similar to [var:X] and [localvar:X], use to insert component variable values.
  • [key:value] - Where both key and value are defined in the RuntimeVariables component, and get replaced using the new OnRequestTextTokenReplacement custom event.

Draggable improvements

AC's draggable system has always been somewhat of a niche feature, but has its uses in the right circumstances. This update removes a fair amount of automated control over various physics settings (e.g. a Rigidbody's Mass and Drag values), in favour of letting the user dictate exact behaviour. New features include being able to define snap points along a track (i.e. regions that an object will naturally gravitate towards when let go), and a new "Cursor Position" method of calculating drag-based movement. This method is best used when tracks are viewed head-on (i.e. a clock-face viewed from the front), but should feel more intuitive when used on e.g. mobile devices.

Scriped ActionLists

While the majority of users will skip this one over, there are those who prefer (or need) to generate their ActionLists through scripting. This update gives each Action a new static function (or several) that generates a new instance with its values pre-populated. This make it much easier to e.g. create sequences at runtime, or procedurally-generate them ready to be edited as normal later. The included "Scripted Action List Example" script takes you through a couple of demonstrations with comments throughout.

ActionList debugging

Better late than never. If a running Action outputs a message or warning to the Console, the exact Action and ActionList it's from are now included in the text.

Comments

  • And the changelog..

    Upgrade notes

    • The new minimum Unity version supported is 2017.1 - contact via the publisher email or forum for assistance with earlier versions
    • The OnDownloadVariable and OnUploadVariable events now take a Variables parameter, used when the variable is from a component
    • The ITranslatable interface, used for custom translation types, now has an index parameter for it's GetOwner and OwnerIsPlayer methods
    • Due to changes to the physics system, existing "Moveable: Set track position" Actions may require their "Movement speed" fields to be adjusted
    • The RuntimeDocuments script's CollectedDocumentIDs property has been replaced by the GetCollectedDocumentIDs function

    Variables

    • Added: Ability to assign PopUp variable labels from presets
    • Added: Ability to insert component variable values into text fields with the [compvar:X:Y] text token
    • Changed: The OnDownloadVariable and OnUploadVariable events now take a Variables parameter, used when the variable is from a component

    Draggables

    • Added: Ability to define snap points on Drag Tracks - allows attached draggable objects to snap to specific points when moving freely along a track
    • Added: Ability for the "Moveable: Check track position" Action to check if a draggable object is within a given Track snap region
    • Added: OnDraggableSnap event - called when a draggable object has auto-snapped along a track
    • Added: The creation of end-colliders for Straight and Curved tracks is now optional
    • Added: Ability to run an Interaction when a draggable object locked to a track is let go by the player
    • Added: Ability to assign the moved draggable object as a GameObject parameter to its own interactions
    • Added: "Actions source" field to draggable objects that are locked to tracks
    • Changed: Draggable objects no longer haver their Rigidbody's Drag value altered while dragging
    • Changed: Draggable objects moving along Curved tracks can now rely on a Rigidbody's Use Gravity property
    • Changed: Due to changes to the physics system, existing "Moveable: Set track position" Actions may require their "Movement speed" fields to be adjusted
    • Changed: Draggable objects now only require a Sphere Collider if they are attached to a Straight or Curved Track that generates end-colliders
    • Fixed: Various issue with draggable object behaviour

    Speech and text

    • Added: Option for subtitles to cease displaying once its associated audio has finished playing
    • Added: Text event tokens - use to replace custom token text using the OnRequestTextTokenReplacement event
    • Added: [line:X] text token - use to insert text gathered by the Speech Manager in the game's current language
    • Changed: For speech lines with audio, automatic talking animations will stop once the audio has finished playing
    • Changed: The ITranslatable interface, used for custom translation types, now has an index parameter for it's GetOwner and OwnerIsPlayer methods
    • Fixed: Issue when moving languages down in the Speech Manager and voice voices are manually assigned
    • Fixed: Speech lines having incorrect Speech Order values when carriage returns separate lines
    • Fixed: Error if a Timeline speech track is previewed but no Subtitles menu to preview it with was found
    • Fixed: Variable and inventory property translation issues

    Menus

    • Added: OnRequestMenuElementHotspotLabel custom event - use to override a Menu Element's Hotspot label
    • Added: Value-smoothing field to Timer menu elements
    • Added: Option to not play hover sounds when over empty inventory item slots
    • Added: Ability to map Cycle menu elements to Global PopUp variables
    • Added: The Slider menu element's "ActionList on change" field is now available for all Slider types
    • Fixed: InputBox elements not being first-selectable in Unity UI menus
    • Fixed: Display issue with InventoryBox element with automatic positioning
    • Fixed: Loading progress bars resetting prematurely during loading screens
    • Fixed: "Menu: Change state" Action not always turning on menus correctly when skipped
    • Fixed: Issues with menus that reference variables and start the game enabled

    Documents

    • Added: Ability to place Documents in categories, and limit their display in InventoryBox menu elements
    • Changed: The RuntimeDocuments script's CollectedDocumentIDs property has been replaced by the GetCollectedDocumentIDs function
    • Fixed: Display issues with InventoryBox elements set to display collected documents
    • Fixed: Document menus sometimes opening inappropriately when switching Player character

    ActionList Parameters

    • Added: Ability for the "Object: Add or remove" Action to set the spawned GameObject as a GameObject parameter in its own ActionList
    • Added: "Placeholder type" field to the "Variable: Check" and "Variable: Set" Actions if the selected variable is set by a parameter
    • Added: Support for parameters in the "Variable: Pop Up switch" Action
    • Added: The "Character: Animate" Action's "New speed" field can now be set with a Float parameter
    • Fixed: "Variable: Check" Action sometimes halting an ActionList if it relies on parameters

    ActionLists

    • Added: Static functions to allow the generation of Actions through script
    • Added: The Actions Manager's "Auto-panning in Editor?" option now works when socket outputs are being dragged out
    • Added: Runtime Console messages from Actions now include a reference to the Action and ActionList they come from
    • Added: Console message if the ActionList Editor is opened via the Hierarchy node icon, and the GameObject has multiple ActionLists, since only the first will be opened
    • Changed: The Action class's isMarked, isRunning, and lastResult variables are no longer serialized
    • Fixed: Rare issue when skipping cutscenes that involve ActionList assets that can have multiple instances
    • Fixed: Inspector issues with the "Set Interaction Parameters" component

    Audio

    • Added: Ability to set an overlap time when looping music or ambience tracks
    • Added: Pitch and volume variance sliders to the Footstep Sounds component
    • Changed: If a Footstep Sounds component has no Sound component attached or assigned, then it will attempt to play from the attached AudioSource automatically
    • Fixed: Remember Sound component not always correctly saving data in Unity 2018

    Characters

    • Changed: The "Character: Hold object" Action's "Rotate 90 degrees" field has been replaced with a "Object local angles" field
    • Changed: The Player script's Hide and Show functions now affect all SkinnedMeshRenderer components in the Player's hierarchy, not just the first-found
    • Fixed: Remember components not correctly saved when switching Players
    • Fixed: Path-pausing issues with characters who rely on retro-style pathfinding
    • Fixed: Camera not snapping to the new Player after a Player-switch involves changing scene
    • Fixed: Player characters not correctly facing Hotspots after moving towards them if the "Player action" is set to "Walk To"
    • Fixed: Player characters moving to Hotspots even if the "Player: Constrain" Action has been used to prevent movement
    • Fixed: Animation issue when Players make use of tank-controls
  • Cameras

    • Added: Option to allow third-person camera rotation during cutscenes
    • Added: Ability to cache Unity's "Camera.main" variable for a minor performance boost
    • Added: Ability to choose between the MainCamera and its Camera transform for forward-vector calculations if they are not the same GameObject
    • Fixed: MainCamera not correctly following a GameCamera if the Unity Camera is on a child of the GameCamera component

    Misc

    • Added: Pause function to the Particle Switch component
    • Added: Ability to force, through script, an Interactive Boundary to consider the Player present, regardless of their true position
    • Fixed: First line of speech in a new scene not always playing if asynchronous loading is used
    • Fixed: Context-sensitive cursor momentarily changing upon clicking a Hotspot if the Hotspot's Interaction doesn't block gameplay
    • Fixed: Set Interaction Parameters component not accounting for specifically which Use or Inventory interaction was run
    • Fixed: Issues with modifying the Autosave with the "Save: Manage saves" Action
  • Wow, these are all amazing! The scripted actionlists may be the thing that makes me give AGS up for good. :) Can't wait to dig into this stuff!

  • Thank you so much, I didn't expect the fix to the tank-controls bug to be up so fast. The other updates seem very cool too.

  • Yay!! Lots of goodies in this update.

    That's really nice... trying out the scripted actionlists it seems you can either convert the script to an actionlist asset while it's running if you attach a cutscene script, or you can use object>call event to run from an actionlist. (From what I can tell. Is there a preferred way to run it in game?)

  • I recommend only dealing with scene-based ActionLists, and not assets, during runtime as the behaviour may differ once in a build and not in the Unity Editor.

  • Awesome stuff!

  • Thank you so much Chris!!

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!