Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. BO2 Modding Support & Discussion
  3. Add things to screen GSC

Add things to screen GSC

Scheduled Pinned Locked Moved BO2 Modding Support & Discussion
4 Posts 2 Posters 152 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • juanzeundefined Offline
    juanzeundefined Offline
    juanze
    wrote on last edited by
    #1

    Hello community, i am making my new zm server and i added some scripts but i am trying to add this:
    asd.PNG
    i searched in the froum and i didnt find anything.

    Cahzundefined 1 Reply Last reply
    0
    • Cahzundefined Offline
      Cahzundefined Offline
      Cahz VIP
      replied to juanze on last edited by Cahz
      #2

      lack Here ya go.

      score_hud()
      {
          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;
          while(true)
          {
              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

      onplayerconnected()
      {
      	for ( ;; )
      	{
      		level waittill( "connected", player );
      		player thread onplayerspawned();
      		player thread score_hud();
      	}
      }
      
      1 Reply Last reply
      1
      • juanzeundefined Offline
        juanzeundefined Offline
        juanze
        wrote on last edited by
        #3

        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"?

        Cahzundefined 1 Reply Last reply
        0
        • Cahzundefined Offline
          Cahzundefined Offline
          Cahz VIP
          replied to juanze on last edited by
          #4

          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
          
          1 Reply Last reply
          0

          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Donate