Question I am trying to make a new script to replace "iprintln". but the script i got doesnt work. can someonw help?

Demon xModRx

Insane-Known Member
Messages
64
Reaction score
5
Points
358
Im trying to make a new script that will replace all "iprintln" and "iprintlnbold". the script will spawn off screen on the right, and casually make its way off the screen on the left. the script that i have does kind of work, but theres 3 things wrong with it. #1 it spawns inside of its self if u spam it. #2 after spawning x amount, it will stop spawning. can anyone me with this script? i need to be able to spawn multiple at once.

Code:
saynotif(thetext)
{
    self.txt = self createfontstring( "objective", 1.5 );
    self.txt.foreground = 1;
    self.txt settext( thetext );
    self.txt.archived=false;
    self.txt setpoint( "CENTER", "", 700, -220 );
    self.txt setpoint( "CENTER", "", -700, -220, 25 );
    wait 3;
    self.txt destroy();
}
 

CF4_99

Veteran
Messages
145
Reaction score
57
Points
888
Added a queue for the messages, so they don't overlap each other. It will wait for the current message to stop playing before playing the next one. This should also Fix problem number 2.
Code:
saynotif(thetext)
{
    while(isDefined(self.txt)) //This is to queue messages so they don't overlap if it is "spammed"
        wait .5;
   
    self.txt = self CreateFontString( "objective", 1.5 );
    self.txt.foreground = 1;
    self.txt SetText( thetext );
    self.txt.archived=false;
    self.txt SetPoint("CENTER", "", 700, -220);
    self.txt SetPoint("CENTER", "", -700, -220, 25);
    wait 3;
    self.txt destroy();
}
 
Top