Squiso je brezplačno, zmogljivo orodje za avtomatizacijo, ki vam omogoča prilagajanje toka Twitch s preprostimi skripti.
Kako preklopiti filter v OBS Studio s točkami kanala Twitch
Ti primeri omogočijo filter v OBS Studio za 10 sekund in ga nato onemogočijo, ko je unovčena točka Twitch Channel Reward.
Primer skripta
import com.squiso.*;
import com.squiso.exception.*;
import com.squiso.scripting.*;
import com.squiso.scripting.data.*;
import com.squiso.keyboard.*;
import com.squiso.twitch.*;
import com.squiso.datatypes.*;
import com.squiso.utils.*;
// Important - Please do not change the row below - otherwise you will get a compilation error!
public class Script_Example extends SquisoScript {
public void onTwitchChannelPointRedeem(OnTwitchChannelPointRedeemData data, API api) throws SquisoException {
// If the reward that got redeemed is called "Pixelate Webcam"
if (data.getRewardName().equals("Pixelate Webcam")) {
// Specify the source
SquisoString sourceName = new SquisoString("Webcam");
// Specify the filter
SquisoString filterName = new SquisoString("Pixelate");
// Enable the filter
api.setOBSFilterEnabled(sourceName, filterName, true);
// Specify a wait time of 10 seconds
SquisoInteger waitTime = new SquisoInteger(10 * 1000);
// 10 seconds later, disable the filter again
api.doLater(waitTime, () -> {
// Disable the filter again
api.setOBSFilterEnabled(sourceName, filterName, false);
});
}
}
}