• 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.

VaM 1.x Atoms on and off by string

Threads regarding the original VaM 1.x

Aipas

Member
Joined
Sep 27, 2024
Messages
79
Reactions
92
I have a scene with a menu-like interface: click an ui button, show some elements (atoms on), hide a bunch (atoms off).
The turning off of atoms has to account for all the possibilities, which means I have to turn off everything that isn't turned on and the mountains of triggers are starting to be too much.

My idea was setting strings
PREVIOUS STRING 1, 2, 3, etc. (these would be the atoms that were on)
NEXT STRING 1, 2, 3, etc. (these would be turned on after a menu click)

So on click:
- turn atoms off (previous strings)
- turn atoms on (next strings)
- next strings become previous strings

Thing is neither the action grouper plugin, nor vam triggers allow me to choose a string as if it were an atom.
Is there any plugin, maybe a menu based one to facilitate this. Doesn't have to be string-based.
I just don't want to add a billion triggers each time I update the scene with more elements.

An example of what I mean:

menu_question.jpg


All those buttons (Story animations, Daisy, Kayla, etc.) need the same mountain of triggers as the one shown.
Elements on the left of the scene are static, they're the buttons proper and the picture frame.
Elements on the righ are the ones that change (text, buttons, thumbnails).
 
Solution
What you want is a better scene structure and trigger organization. If you're adding the same triggers in multiple places, you're making your scene messy, complicated to manage and rigid to experimentation.
Logicbricks, VAMStory Director, and others alike can give you not only ways to organize your triggers more efficiently, but also give you new capabilities. Forget whatever "string" option you wanted to do, go try the plugins mentioned.

e.g. Scene has 3 actions and 3 buttons to start each

the newbie approach
triggers in each button (3 times this):
  • stop Timeline animations
  • clean fluids
  • stop moans
  • pose persons in pose x
  • start animation x
Green triggers are...
Not sure if by string is feasible, but you could parent the atoms to something else like a Subscene or Empty, then you would only need to turn on/off that parent atom.
 
Upvote 0
That would certainly help with common elements, but I'd still like something more streamlined.

Good idea nonetheless.
 
Upvote 0
What you want is a better scene structure and trigger organization. If you're adding the same triggers in multiple places, you're making your scene messy, complicated to manage and rigid to experimentation.
Logicbricks, VAMStory Director, and others alike can give you not only ways to organize your triggers more efficiently, but also give you new capabilities. Forget whatever "string" option you wanted to do, go try the plugins mentioned.

e.g. Scene has 3 actions and 3 buttons to start each

the newbie approach
triggers in each button (3 times this):
  • stop Timeline animations
  • clean fluids
  • stop moans
  • pose persons in pose x
  • start animation x
Green triggers are identical in all buttons, blue is specific to each button.

the efficient approach
triggers in a single logicbrick relay plugin in any scene atom:
  • stop Timeline animations
  • clean fluids
  • stop moans
triggers in each button (3 times this):
  • trigger logicbrick relay
  • pose persons in pose x
  • start animation x

In the efficient approach the triggers identical to each button all call the same place, the logicbrick relay. If you need to change that common set of triggers, you now only need to do it in one place, while in the "newbie approach" you'd need to go to each button and make 3 times the changes.
Not a big deal with this scene scenario, but you can see that when it scales, you'll not only be saving a lot of time, but you can also know that you're not forgetting something somewhere and you can make changes easier and consistent.
And this is only a small introduction to using a better scene structuring and plugins like logicbricks and others. Learn to use them and plan your scene triggers, it's worth it.
 
Last edited:
Upvote 0
Solution
I've finished saving a solution. It's not elegant, but it works.

The whole problem I had was somehow "saving" the elements that were turned on when menu clicking, so that the next click would turn those specific ones off, instead of each button having to turn everything off, and then the appropriate ones on.
I've thought about state machine logic brick but haven't really tested it. Will have a look at relay.
 
Upvote 0
Relay work well. Button tells relay to turn everything off and then turn the approapriate elements on.

This solution involves more CPU processing (I know, I'm splitting hairs on an atomic level, especially on this particular scene which is just a menu), but more importantly, it's much easier to add new elements to the scene.
Big thanks.
 
Upvote 0
Back
Top Bottom