
I have messaged @nick O but in the chance he is unable to reply, I am trying to use his tip for the breakScreen API. I followed all his step to the T. (as far as I can tell) I have run the !clearBreakScreenText command to clear the history after changing the text font, like he says you have to do in his video. However unlike him once I did that the whole thing stopped working. I can not figure out for the life of me what I am doing wrong. Edit: I will edit all the attempts to correct the issue as they are attempted so that people do not need to read a million posts. yes I have a Pro account, as needed. I have a token named: textLocation, as instructed on the breakScreen. I have a rollable table named: loadingMessages, again as instructed. edit:I have moved the ribbon off the breakscreen, then reloaded the campaign and moved the ribbon back and moving the ribbon made no difference. edit: Other scripts are functioning corectly. My sandbox is listing no errors. I have watched the video like 10 times and I am so frustrated since I had it working at one point and now I cant get to work again. Obviously I am VERY green in anything to do with coding, like say macroing and API coding. So I have found videos like Nick's to be a godsend and a true help. However, I am stuck at this point. I don't know what else to do. on("ready",function(){
var isItRunning;
on("change:campaign:playerpageid",function(){
var currentPage = getObj("page",Campaign().get("playerpageid"));
if (currentPage.get("name")=="breakScreen"){
var textBox;
var token = findObjs({
name:"textLocation",
type:"graphic",
pageid:Campaign().get("playerpageid")
});
if (token[0] === undefined){
sendChat("API","Could not locate a token named textLocation");
return;
}
var textLocation = token[0];
if(!state.BreakScreen){
log("increate")
textBox = createObj("text",
{
text:"Hello World",
font_size:36,
font_family:"Patrick Hand",
color:"rgb(255,255,255)",
layer:"objects",
pageid:Campaign().get("playerpageid"),
left:textLocation.get("left"),
top:textLocation.get("top")
});
state.BreakScreen = {
module:"Break Screen",
textID:textBox.get("id")
}
}
else{
textBox = getObj("text",state.BreakScreen.textID);
}
var tables = findObjs({
type:"rollabletable",
name:"loadingMessages"
});
if (tables[0] === undefined){
sendChat("API","Unable to locate a rollable table called loadingMessages");
return;
}
var loadingMessagesTable = tables[0];
var messageList = findObjs({
type:"tableitem",
rollabletableid:loadingMessagesTable.get("id")
});
isItRunning = setInterval(function(){
var tableItem = messageList[(randomInteger(messageList.length)-1)];
textBox.set({
text:tableItem.get("name"),
left:textLocation.get("left"),
top:textLocation.get("top")
});
},3000);
}
else{
clearInterval(isItRunning);
}
});
on("chat:message",function(msg){
if(msg.type=="api" && msg.content.indexOf("!clearBreakScreenText")==0){
textBox = getObj("text",state.BreakScreen.textID);
if(textBox!==undefined){
textBox.remove();
}
state.BreakScreen = undefined;
}
});
});