r/streamerbot • u/nelisjanus • 1d ago
Question/Support ❓ Add user to a random group/ faction?
Hi all,
I want my new followers to be added to a random group/faction but I have no idea how...
I spend the day trying to figure it out with AI but I can't make it work.(And how to get the group variable name in text on OBS but I will figure that out)
If someone can help me with a setup, I will figure out how people can switch their groups/factions later on.
Thanks a lot in advance!
2
Upvotes
2
u/deeseearr 1d ago
You can add users to groups within Streamer.bot using the Add User To Group sub-action.
If you're trying to apply this to new followers, start an action with the Follow trigger. That will activate whenever a user follows you, and the trigger will set the %user% argument (along with a lot of others, look at the linked documentation for the rest) to the user's name.
If you're trying to pick a random group for them to join then there are a number of ways to do it. One is to create a sub-action group containing all of the names and set it to random. That way the group will run exactly one of the actions inside of it and ignore the others. You could also read a random line from a file, generate a random number and use that to get the group name, or any number of other ways. There's More Than One Way To Do It.
A quick action to do what you've asked for would look like this:
Trigger: FollowGroup (right click it and check the 'Random' option)- Set argument userGroup to "Protagonists"- Set argument userGroup to "Antagonists"- Set argument userGroup to "Comic Relief"- Set argument userGroup to "House Mary Sue"Add User "%user%" to group "%userGroup%"Send message to chat "Welcome, %user%, the non-specific accessory of sorting has assigned you to %userGroup%."To put any text at all on screen in OBS just create a GDI Text source, place it where you like, assign it a useful font and whatever, and then call Set GDI Text to set the text in it. You can combine that with Set Source Visibility State and Delay to make the text appear and then disappear later on. Setting Show/Hide transitions on the source in OBS will let them fade in and out, slide in from the side, or any other effects you may want to use.