A SpeechRecognition brick and the EvilCorpHQ scene have been released as separate packages. This can recognize simple keyword lists as well as more complex grammar using Windows 10 and Unity's speech recognition features.
More details here: MacGruber.SpeechRecognition.1.
(Watch video with sound!)
Just a quick maintenance release.
Changelog
Known Issues
- StateMachine: Fixed SetStateDisabled trigger not resetting.
- EventSceneLoad: Added options to trigger only for VR/Desktop mode. Allows you to do different things depending on whether you are in VR or Desktop.
- EventSceneLoad: When have not yet given LogicBricks permission to run when loading a scene, the plugin will not trigger properly. Other plugins might have similar issues anyway. To make sure everything is working as intended, simply reload the scene again once all permissions are granted.
There is now a new more elaborate separate demo scene named CyberNight that shows how to build branching multiple-choice dialogs. Please excuse the poor dialog, I'm a coder, not a Hollywood writer. Anyway, you got a couple of branches (see diagram) that kind of make sense and in the end converge to "happy action"...which is a slightly improved version of the Life demo scene ported into this environment. The intention here was a not too complicated demo on how you could structure branching dialog scenes using LogicBricks, while still having a decent scene.
Changelog
- StateMachine: Concept of multiple transition sets. By default a state waits for its timer to run out and it would select a random transition, this is now called the "Default Timeout" choice. In addition there are now choices A,B,C,D,E and F which each got their own transition sets. The State will for example select randomly among the A transition set, if it receives a SetChoiceA trigger signal. There is also a SetChoiceA_and_Wait variant, which still lets the state duration run out before switching. Obviously this is what makes branching scenes with multiple-choice dialogs possible, the input could come from buttons, but also collision triggers or whatever you can think of. (This was originally teased under the name DialogMachine before, but I decided to integrate it directly into StateMachine to reduce maintenance efforts in the long-term. StateMachine is a super complex plugin by now, I can't afford to maintain two of those. However, I'm thinking about adding a switch that hides the more complex UI options to avoid it being too overwhelming, but that will be a later update.)
- StateMachine: Concept of enabled/diabled states. This prevents the StateMachine from choosing a transition to this state, it's mostly intended to disable branches of your scene during development while you focus working on a particular part. However, this can be accessed via triggers as well, so it can be used for other purposes. Use triggers SetStateEnabled/SetStateDisabled with the name of the state or alternatively SetStateEnabledAll/SetStateDisabledAll to switch them all at once. Disabled states appear with red font color in the various UI drop-downs.
- StateMachine: Restoring the current state while saving the scene instead of switching to a specially marked initial state. OnEnter actions are no longer called on load. This bring UX closer to IdlePoser which does the same and also makes it easier to store your scene in a save state.
- StateMachine: Added Duplicate button to clone a state including all data, transitions and triggers.
- StateMachine: Added SkipState button to jump to the end of the timer. Helpful when debugging scenes and you want to skip ahead to a particular part.
- StateMachine: Improved error messages when trying to switch to an non-existing state.
- StateMachine: Minor performance improvement by not updating the UI, if the UI is not actually visible.
- RandomChoice: Added Duplicate button to clone a choice including all data and triggers.
- SelectChoice: New brick similar to the RandomChoice, except that the choice is not random, but based on a drop-down parameter you can set via trigger. Basically its a "switch" statement you might know from many programming languages.
- SelectChoice: Added Example11 to the included demo scenes to demo the SelectChoice brick.
- ValueThreshold: This brick was already hidden in the DoubleTrouble release and was now officially added to LogicBricks. It allows you to fire a trigger when a float value crosses a particular threshold, the DoubleTrouble scene uses it for lube audio effects of the handjobs.
- RandomSound and RandomSoundFromAB: Choose between the various audio play modes VaM offers like "PlayNowClearQueue", "PlayIfClear", "QueueClip", etc.
- RandomSoundFromAB: Added "AddAll" button to make it easier to add an entire AudioBundle at once.
- RandomSound and RandomSoundFromAB: Using twin buttons for more efficient use of UI space.
- Updated MacGruber_Utils.cs to the most recent version to have all the fixed here as well.
Changelog
Screenshots
- New ValueUpDown brick: This provides a value that ping-pongs between 0 and 1. You can smoothly adjust the speed and through triggers you can have it smoothly stop at exactly 0 or 1, causing a trigger signal you can connect to. This is obviously useful handjobs and similar animations where you want them to stop at a precise point to you can transition to some other animation. You see this in action in the video.
- New LinearAnimation brick: This brick allows you to interpolate the position of an atom between two positions. Essentially this is an AnimationPattern with just two steps, except it's all in a single atom and its actually linear. In the video you see this in action as well, it's utilized to animate Empty atoms used as anchor for IdlePoser states. This keeps your scene organized when you need like 10 different of those anchor atoms in a very tight space where it would be impossible to tell the AnimSteps apart.
- StateMachine: New option for having a "cooldown" on states, preventing them from being selected again, unless there is no other choice. This can also be set via trigger.
- StateMachine: Now using VaM's filter popups so you can keep your sanity while handling way more states.
- StateMachine: States can now transition to themselves (this was a request)
- Various bricks now have an AcceptTrigger option, allowing you to turn on/off their reaction to incoming triggers. This mean you can now essentially disconnect/reconnect trigger connections via trigger. It's been added to Relay, RelayOnce, Delay, RandomDelay, Blend, RandomBlend, Loop, RandomLoop, RandomChoice, RandomSound and RandomSoundFromAB.
- Added a number of new examples as well as updated some existing ones for the new bricks and features. Examples are split into 3 scenes now.
New Features
- Added ValueTriggers that provide a value between 0 and 1. These can be used for various blend operations between value or color parameters using VaM's trigger system. A number of new bricks come with this: ValueRelay, ValueEaseIn, ValueEaseOut, ValueSmoothStep, ValueInvert, ValueRandom
- New Blend and RandomBlend bricks, which are a variant of the Delay and RandomDelay. After Trigger was called, these provide a separate Start trigger, a value slowly going from 0 to 1 and eventually an End trigger. Classic use case would be to blend something in or out.
- StateMachine does now provide a value trigger as well, exposing the internal state clock.
- Counter brick can now count up and down and provides a status value between 0 and 1. Provides a trigger signal when reaching either end of the range.
- New RandomSound and RandomSoundFromAB bricks to play random sounds on trigger signal. These can load VaM's embedded sounds, sound from the Scene Audio tab as well as load sounds from AssetBundles.
- New EventSceneLoad brick that triggers on scene load.
- New EventAudioQueueEmpty brick that triggers when an AudioSource did run out of audio to play.
- New RichText helper plugin. Allows you to use Unity RichText on SimpleSign and UIText atoms. You can have bold or italic font, control the fontsize as well as color of individual words. I used this for the example scenes.
- Various code improvements for the MacGruber_Utils library used in the background.
- Updated examples and also added more. There are now 19 examples altogether, split into two demo scenes. This includes a more complex example using two StateMachine bricks to control interacting AnimationPatterns for a Handjob setup.
Another bugfix update for LogicBricks. Again, thx @ TGC for reporting those issues!
Note that you can easily update your scene to the new version by opening your scene JSON file with a text editor (e.g. Notepad++) and search&replace "MacGruber.LogicBricks.3:/" with "MacGruber.LogicBricks.4:/" everywhere. You can update from versions 1 or 2 towards 4 the same way. I recommend to keep a backup of the original scene, just in case.
- RandomChoice: Fixed UI not being updated on load.
- StateMachine: Fixed initial state setting having no effect.
LogicBricks is now free! Version 3 features some bug fixes and UI improvements. Thx @ TGC for reporting those issues.
- Fixed StateMachine UI not being updated on load.
- Time sliders of all plugins have range buttons now. That means you are not limited to a maximum of 2 minutes anymore, sky is the limit! Range usually auto-adjusts to the next power of 10 when needed, although there are some cases where that doesn't happen, but I can't fix all VaM weirdness.
- All sliders that need a whole number (like "Count") now actually display as whole number without confusing ".00" decimal point.
- Updated screenshots.
Since this got a surprising amount of likes in very short time there seems to be a need for this. So I changed plans and added a LOT more LogicBricks. These go now from a simple Relay that just groups triggers via Counter and Timer to more complex bricks for RandomChoice and a very powerful StateMachine brick. I also added a demo scene with 14 examples to spawn some ideas.
LogicBricks
- Relay: LogicBrick that triggers directly after Trigger is called. Useful if you want to trigger the same things from multiple sources.
- RelayOnce: LogicBrick that triggers directly after Trigger is called, but only once. Call Reset to use again.
- Counter: LogicBrick that triggers once after Trigger was called a number of times. Resets automatically when count is reached. Call Reset to reset manually.
- Delay: LogicBrick that triggers a fixed time after Trigger is called.
- RandomDelay: LogicBrick that triggers a random time after Trigger is called.
- Loop: LogicBrick that triggers multiple times with at a fixed time interval after Trigger is called.
- RandomLoop: LogicBrick that triggers multiple times with at a random time interval after Trigger is called.
- Timer: LogicBrick that triggers continuously in a fixed time interval.
- RandomTimer: LogicBrick that triggers continuously in a random time interval.
- RandomChoice: LogicBrick that, after Trigger is called, selects a random Choice to trigger. Use Avoid Repetition take the last one or two choices out of the selection, depending on the number of total available choices.
- StateMachine: Very powerful LogicBrick that represents a the concept of a StateMachine. Each State has a random duration after which it randomly chooses among the transitions of that State to switch the next State. Can also be controlled externally as well as provides a sync feature to sync with other systems in your scene.