Add things to screen GSC

Topic created · 4 Posts · 67 Views
  • Hello community, i am making my new zm server and i added some scripts but i am trying to add this:
    i searched in the froum and i didnt find anything.

  • @LaCk Here ya go.

        self.score_hud = createFontString("hudsmall" , 1.7);
        self.score_hud setPoint("RIGHT", "RIGHT", "RIGHT", 160);
        self.score_hud.label = &"^6Score: ^7";
        self.score_hud.x -= 10;
            self.score_hud setValue(self.score);
            wait 0.05;

    If you don't like the position on the screen, you can change the setPoint to "LEFT", or "CENTER". 160 is the Y AXIS (up and down) so you can change that value if you don't like the position on that axis specifically.

    EDIT: Forgot to mention, call this under onplayerconnect like so

    	for ( ;; )
    		level waittill( "connected", player );
    		player thread onplayerspawned();
    		player thread score_hud();
  • @Cahz said in Add things to screen GSC:

    RIGHT", "RIGHT", "RIGHT", 160

    okay good but which of this one is the x-axis "RIGHT", "RIGHT", "RIGHT", 160"?

  • @LaCk if you want to bring it towards the center, you can change all of them to center. or all to left for left side of the screen.

    or if you want to just completely override the x coordinate,

    self.score_hud.x = 100; //change 100 for diff position
Log in to reply