Plugins LogicBricks 12 (free)

LogicBricks is a collection of now 31 reusable logic plugins to quickly build simple logic without coding. These go from a simple Relay that just groups triggers via Counter and Blend to more complex bricks for RandomChoice and a very powerful StateMachine brick. There are four demo scenes with altogether 26 examples to spawn some ideas.

The key feature here is that it is using VaM's own Trigger UI, so it should be familiar and easy to use for any creator who used VaM's trigger system before. Just like an UIButton, you can hook it up to AnimationPattern's, Timeline, other plugins and all the kinds of things VaM has to offer.

LogicBricks are a good way to make your scenes a bit more interesting without coding skills. Have some randomness and logic rules instead of just simple animation loops. For example the scene controller plugin used in the Life04 demo scene could now be entirely replaced with just a StateMachine brick. However, you likely won't want more than a few of these in your scene, since at some point coding a custom plugin for your scene becomes way easier.

Note that you can download older versions of this plugin for free from here.

There is a separate package with five demo scenes containing altogether 26 examples that hopefully will spawn some ideas for you. This includes a more complex example using two StateMachine bricks as well as a ValueUpDown brick controlling IdlePoser animation for a Handjob setup. Another example, using ScreenFade and LoadingDelay bricks, shows how to have a nice fade-to-black transition to hide the transition when loading another subscene.

In addition I recommend to checkout my three more elaborate demo scenes that make use of LogicBricks:
  • DoubleTrouble: POV bondage femdom. NOT simple linear animation, different every time you play it.
  • CyberNight: Demo showing how you can build branching multiple-choice dialogs that came with LogicBricks 7.
  • EvilCorpHQ: Simple demo showing the separate SpeechRecognition brick.
There is also a hopefully growing number of video tutorials that can be found here:

StateMachine1.jpg RandomChoice.jpg RandomDelay.jpg StateMachine2.jpg
Examples1.jpg Examples2.jpg Examples3.jpg SmoothLoading.png

  • 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 can count up and down and provides a status value between 0 and 1. Provides a trigger signal when reaching either end of the range.
  • Delay: LogicBrick that triggers a fixed time after Trigger is called.
  • RandomDelay: LogicBrick that triggers a random time after Trigger is called.
  • LoadingDelay: Similar to Delay, except that it internally resets its timer while there is any loading in progress. So you trigger it before you start loading stuff and get a trigger back X seconds after loading finished. The extra delay allows you to wait for hair/clothing/body physics to settle into place.
  • Blend and RandomBlend: These are a variants 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.
  • 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.
  • SelectChoice: 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.
  • SequenceChoice (new!): Similar to RandomChoice and SelectChoice. However, each time it's triggered, it executes the next item in the sequence. There is also a RandomShuffle option.
  • RandomSound: Plays random sound after Trigger is called. This can work with VaM's embedded sounds as well as sounds referenced on the Scene Audio tab. Needs to be placed on a Person, AudioSource, RhythmAudioSource or AptSpeaker atom.
  • RandomSoundFromAB: Similar to RandomSound, but can load sounds from AssetBundles instead. If you have lots of sounds, this loads way faster and is more convenient.
  • 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. More advanced features allow you to use this brick to build multiple-choice dialogs in your scenes.
  • SequenceMachine (new!): Similar to StateMachine, except transitions are fixed so states are gone through in sequence. This makes handling this common case a lot easier. There is also a RandomShuffle option.
  • ValueRelay (updated!): Just like a relay, but for values.
  • ValueEaseIn: Relays a float value after applying a quadratic EaseIn curve. (FadeIn)
  • ValueEaseOut: Relays a float value after applying a quadratic EaseOut curve. (FadeOut)
  • ValueSmoothStep: Relays a float value after applying a classic SmoothStep curve (FadeIn - FadeOut).
  • ValueInvert: Relays a float value after inverting it: 1 - X
  • ValueRandom: Provides a random value between 0 and 1 when Trigger is called.
  • ValueUpDown: 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 this video.
  • ValueThreshold: 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.
  • LinearAnimation: 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 this video you see this in action, 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 AnimationSteps apart.
  • EventSceneLoad: Brick that triggers on scene load. Also allows you to do different things depending on whether you are in VR or Desktop.
  • EventAudioQueueEmpty: Brick that triggers when an AudioSource did run out of audio to play. Needs to be placed on a Person, AudioSource, RhythmAudioSource or AptSpeaker atom.
  • ScreenFade: Brick that can fade the entire scene to any color. Nice to cover up loading transitions, things like player teleports or simply helping with telling the story of your scene.
  • 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.

Additional LogicBricks in separate packages
  • SpeechRecognition: Recognize simple keywords lists as well as more complex grammar using Windows 10 and Unity's speech recognition features.

Coders: Make your own!
I hope this collection will grow eventually as I need little plugins when building demo scenes for other plugins. Maybe other coders chime in and build compatible plugins using the same EventTrigger system. If you are a coder, check out the included MacGruber_Utils.cs, which handles the needed building of custom UI for the trigger screen, internal handling of AssetBundles as well as scene load/save for you. The Utils class also helps with creating sliders, buttons, etc. for your plugin UI. including some custom UI elements and handling for context sensitive UI that can change at runtime. If you build your own LogicBrick plugin, using one of mine as a starting point might be a good idea.

This was an EarlyAccess release! Download is now available for free under CC BY-SA license. You are allowed to reference this package in your own VAR packages, even if they are paid or use a different license. Links to my Patreon are always appreciated.
First release
Last update
5.00 star(s) 15 ratings

More resources from MacGruber

Share this resource

Latest updates

  1. Version 12 (free)

    Version 12 is now free!
  2. Version 12

    Version 12 just adds a small feature to the ValueRelay brick. Changelog for LogicBricks v12...
  3. Version 11

    Version 11 introduces two new bricks, SequenceMachine and SequenceChoice. Changelog for...

Latest reviews

Clean code.
Used the tutorial to learn how they work.
good work!
This is so insanely useful, I couldn't use VAM without it
Insanely powerful! Also easy to use after playing with it for a bit.
As I'm a noob at c script coding. The bricks are a absolute and easy to use must have when it comes to creating complex VAM scenes.
Had to sub just for this. State machine is SO powerful. It now controls almost every aspect of my scenes. Just awesome, and criminally underrated.
Not into coding ? You prefer scripting in your scene. This is the plugin you need.
Top Bottom