Closed scruffyfox closed 2 years ago
Hey @scruffyfox, when you say "a couple scripts" are you referencing Kruiz Control events? Making sure you don't mean Javascript scripts.
The OnAction
section would fit your use case. OnAction
takes the event code and injects it into another event.
OnCommand b 0 !chain
Chat Send "Pre-Chain stuff..."
DoTheThing
Chat Send "Chained stuff..."
OnChannelPoint "Randomize VFX"
Chat Send "Randomizing stuff..."
DoTheThing
OnAction DoTheThing
Chat Send "Hey, we're doing the thing!"
is equivalent to
OnCommand b 0 !chain
Chat Send "Pre-Chain stuff..."
Chat Send "Hey, we're doing the thing!"
Chat Send "Chained stuff..."
OnChannelPoint "Randomize VFX"
Chat Send "Randomizing stuff..."
Chat Send "Hey, we're doing the thing!"
@Kruiser8 this is perfect! I had a feeling OnAction
would be what I needed but I couldn't make full sense of the documentation. Thanks!
Basically the title.
I have a couple scripts that are quite complex and lengthy, but I would like them to trigger also from another trigger, is this possible?
This is my use-case: channel point redemption for "randomise vfx", which executes a long script to generate and send some API values, but at the end, I want to also
Chat Send
the result of the randomisation which is another long script triggered with!chain
. I couldChat Send '!chain'
which would trigger the command via chat, but was wondering if there's a nicer way of doing that from within the script.I read about the
Action
section but didnt really understand how it's used or if it would help in my use-case.Cheers!