• Hi Guest!

    We are extremely excited to announce the release of our first Beta1.1 and the first release of our Public AddonKit!
    To participate in the Beta, a subscription to the Entertainer or Creator Tier is required. For access to the Public AddonKit you must be a Creator tier member. Once subscribed, download instructions can be found here.

    Click here for information and guides regarding the VaM2 beta. Join our Discord server for more announcements and community discussion about VaM2.
  • Hi Guest!

    VaM2 Resource Categories have now been added to the Hub! For information on posting VaM2 resources and details about VaM2 related changes to our Community Forums, please see our official announcement here.
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