Forum rules - please read before posting.

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.

«1

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!!

  • Version 1.69.1:

    • Added: Remember Particle System component - attach to Particle System components to save their playback state
    • Added: Option to the Collision script to prevent it changing the GameObject's layer when turned off or on
    • Added: Option to the "Inventory: Add or remove" Action to remove the last-selected item
    • Added: "Load Fade Time" field to the MusicEngine and AmbienceEngine prefabs - use to control the fade-in time when resuming music and ambience upon loading
    • Added: Parameter support for the "ActionList: Pause or resume" Action
    • Added: The ignoring of NavMeshes that are out of the screen's bounds when relying on point-and-click movement is now optional
    • Added: Warning message if a 2D Player's Hotspot detector is placed on the root, or an immediate root that is not also the sprite child
    • Changed: The gizmo state of non-selected Hotspot, Colliders, Triggers and NavMeshes are no longer serialized
    • Changed: If a GameCamera ThirdPerson’s pitch angle is fixed, it can now be set at all times - not just during gameplay
    • Fixed: Pathfinding issues if the Player is moving during an asynchronous scene switch
    • Fixed: Issue with the "Inventory: Check selected" Action when checking for items in a specific category
    • Fixed: "Inventory: Property to variable" Action not being able to update local variables
    • Fixed: Footstep Sounds component's "Volume variance" not accounting for "Relative volume"
    • Fixed: Issues with drag-and-drop inventory combined with Unity UI menus
    • Fixed: Display issue when crossfading between scenes in Linear colour space
    • Fixed: Sprite-based characters having their Rigidbody2D's Gravity Scale value forced to 1
    • Fixed: Error messages when integrating with UFPS v1 in v1.69.0
    • Fixed: Minor Editor visual issues
  • Super work, Chris, can't wait to test this version out!

  • Whoa, already?! Great stuff.

  • Added: "Load Fade Time" field to the MusicEngine and AmbienceEngine prefabs - use to control the fade-in time when resuming music and ambience upon loading

    Amazing, just yesterday I really needed this feature.
    Best unity asset! (And damn, I sell unity assets too u_u xD)

  • @Alarconte: Your timing was good!

    Version 1.69.2:

    • Fixed: GameCamera Third Person and GameCamera 2D Drag cameras accepting input when they are not the active camera
    • Fixed: Player character not responding to immediate movement commands upon switching scene asynchronously in v1.69.1
    • Fixed: Issue with the Remember Particle System component when saving to the Json file format
    • Fixed: Actions translation IDs being reset when cut in the ActionList Editor
  • Woa, that's a lot!

    I diff-ed all changes before committing the new upgrade, and there are pretty neat additions! Thank you :)

  • Thanks for another great update Chris.

  • Version 1.69.3:

    • Added: Option to confine the system cursor to the game window, when targeting the Windows platform
    • Added: Ability to run an Interaction when a PickUp object is let go by the player
    • Added: Ability to assign the grabbed PickUp object as a GameObject parameter to its own interactions
    • Added: Ability to negate the effect of the Limit Visibility component, so that an object is invisible for certain cameras
    • Added: LimitCursorToMenu property to the PlayerCursor script - if set, the software cursor's range of movement will be limited to that Menu's boundary
    • Added: Warning message if a pause Menu cannot play audio due to the scene's Default Sound not being able to play sounds while the game is paused
    • Added: OnPlaySound, OnStopSound and OnPlayFootstepSound custom events
    • Added: Ability, through script, to access Variables by name as opposed to ID number
    • Added: Ability, through script, to add and remove items from the Player’s inventory by item name, as opposed to ID number
    • Added: Properties panel for the ActionList component
    • Changed: Most private variables and functions are now protected, to aid custom subclassing
    • Changed: If an attempt to save the game is made when saving is prevented, the Console warning now provides the specific reason why
    • Changed: The OnContainerRemove custom event is now called after the item has been transferred to the Player's inventory, as opposed to just before
    • Changed: The Follow Sorting Map component now also affects inactive children
    • Changed: The "ActionList: Run" Action's "Set parameters?" checkbox is now unchecked by default
    • Changed: The Menu Manager's "Apply outline offset fix?" field is now enabled by default
    • Fixed: Saving being possible when it shouldn't be when using a custom interface
    • Fixed: Issues with Pause menus that are enabled when the game starts
    • Fixed: Issues with the assigning of a draggable object as a parameter in its own interactions
    • Fixed: Direct input controls not responding if the inputs are held down before the game is run or upon a scene-switch
    • Fixed: Simulated cursor being placed at the centre of the screen after switching each scene
    • Fixed: Label elements set to Automatic size not always resizing correctly
    • Fixed: Hierarchy icons appearing too far to the left in Unity 2019
    • Fixed: Issues with menu hover and click sounds playing simultaneously
    • Fixed: Minor issues in the Manual
  • LimitCursorToMenu looks like a very nice addition, I'll check it whenever I can.

    I'll make a suggestion if I may:

    Could we have in the editor, a slider for the menus elements section? There is a slider for menus, and thats nice because its easy to use many menus in any game, but many of my menus are just huge in number of elements (in the quantities of hundreds) and having to select an element, and scroll down a lot to edit it, specially when for whatever reasons the system goes laggy (specially editing prefab menus) is pain.

  • Could we have in the editor, a slider for the menus elements section?

    A very reasonable suggestion, I will look into it.

  • Version 1.69.4:

    • Added: Scroll bar to the Menu Manager’s list of menu elements
    • Fixed: Error when using loading scenes that do not have a GameEngine prefab in v1.69.3
    • Fixed: Cycle menu elements no longer linking correctly to Dropdown UI components
    • Fixed: Containers not respecting the “Place in separate slots?” setting of Inventory items
  • To have the last thing added to my AC (containers fix) should I just update scripts?

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!