Add things to screen GSC
-
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.
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(); } }
-
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