Console Blinking Repeativly.
itzkaydo opened this issue · 6 comments
itzkaydo commented
After checking out the source i cant see the issue. The console keeps blinking repeatedly and giving me a stroke. Does anyone have some info on how to stop this?
devilExE3 commented
The way the text is display causes this. I recommend you make yourself a windows forms app, or change the way you display text (using the screen buffer)
shlifedev commented
i will re-write better example. ;)
oOHiyoriOo commented
- make some string vars
- set them to the stat u wanna display
- update everything at once
That solved it for me.
heres my update code (i implemented a gui and displaying them there (i think ill upload my code to github asap for u to take a look on))
// save stats in string first to prevent text flickering
public static String Player = "";
public static String Imposter = "";
public static String Dead = "";
[...]
while(true){
// PlayerStats
Globals.Player = "";
Globals.Imposter = "";
Globals.Dead = "";
[...]
foreach (var data in playerDatas){
if(data.PlayerInfo.Value.IsImpostor == 0 && data.PlayerInfo.Value.IsDead == 0)
Globals.Player = Globals.Player + "\n>" + Name;
else if(data.PlayerInfo.Value.IsImpostor == 1 && data.PlayerInfo.Value.IsDead == 0)
Globals.Imposter = Globals.Imposter + "\n>" + Name;
else if(data.PlayerInfo.Value.IsImpostor == 0 && data.PlayerInfo.Value.IsDead == 1)
Globals.Dead = Globals.Dead + "\n>" + Name;
}
Globals.PlayerForm.Invoke((MethodInvoker)delegate {
Globals.PlayerForm.PlayerField.Text = Globals.Player;
Globals.PlayerForm.ImposterField.Text = Globals.Imposter;
Globals.PlayerForm.DeadField.Text = Globals.Dead;
});
}
oOHiyoriOo commented
note that theres some code missing i didnt included here so idk if it works out of the box. you might have to fix some of it but like i said ill upload my code asap for oyu guys to see and use.
thkdlflghlsdghilr commented
That worked for me
oOHiyoriOo commented
nice to hear! have fun playing !