shlifedev/among-us-memory

Console Blinking Repeativly.

Closed this issue · 6 comments

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?

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)

i will re-write better example. ;)

  1. make some string vars
  2. set them to the stat u wanna display
  3. 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;
                });
       }

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.

That worked for me

nice to hear! have fun playing !