• Hi Guest!

    We have posted a new VaM2 dev log on Patreon, starting a monthly cadence of written progress updates between Beta releases. Highlights include the new Gizmos System, Selection Carousel, and Modes System with Context-Specific Editing. Beta1.2 is 15 of 21 items complete.

    Read the full post on Patreon, or follow progress on the public Trello roadmap.
Conditional State Machine

Plugins + Scripts Conditional State Machine

Download [<1 MB]
ss01.png
Hey. I've been tinkering with all kinds of scenes for a year or two now and this is my first contribution to the hub. There are probably far better options out there, but I just wanted a simple condition/trigger system.

I vibe-coded this with NO C# coding experience AT ALL using Claude. Use at your own risk. It seems to work but that's no guarantee of efficiency or stability. If it breaks, I will have to use Claude to fix it. If there is a better way to create the same effect, I'm happy to look at it; I couldn't make LogicBricks work how I wanted it to, but that's my limitation. I didn't think to search for 'logic' on the hub until I had finished making this, haha.

--
This is a global conditional pool. Create named conditionals once, assign to any state. Each state assignment specifies required value (TRUE/FALSE) and whether to reset that conditional when the state fires.

1) Create a conditional by writing a name in the box and hitting +Add Conditional. Repeat for all required Conditionals.
2) Create a State by writing a name in the box and hitting +Add State. Repeat for all required States.
3) Select a State. Assign Conditionals by selecting them (all Conditionals are listed). Check the box if its value needs to be TRUE. Uncheck if the value needs to be FALSE.
4) Check the Reset on Fire box if this conditional is to be automatically reset. It can be set manually through other actions.
5) States can be automatically or manually triggered when all conditions are met.
6) Call SetConditionalTrue, SetConditionalFalse, TriggerState, and ResetState from other plugins.
7) Configurations can be saved and loaded, but external calls might have to be reconnected to the external plugin.
--

Thanks to MacGruber's LogicBricks (MacGruber_Utils.cs) for providing a workable trigger system.
Images and attachments
  • ss02.png
    ss02.png
    31.1 KB · Views: 0
  • ss03.png
    ss03.png
    34.6 KB · Views: 0
  • ss04.png
    ss04.png
    59.5 KB · Views: 0
React to this content...

Share this resource

Back
Top Bottom