Modme Forums
Menu:

FPS drop when setting text to hud?

Game Modding | Call of Duty: Black Ops 3 | Scripting


Sleepy216:

So I've been playing around with scripting my own gun game. However I noticed when the "points to next weapon" updates, using settext, my frames drop.
The frames drop worse when the weapon and points update together.
I assumed it was just because my pc is trash and I was testing it in my near finished map. So I threw it in a test map and still got noticeable frame drops.

This is what I used to update, I'd just have this run when my current score was not the same as my old score, then update the old score to the new one:

goalhud SetText( "Points To Advance: " +goal );


I also tried to make what I wanted the text to say defined as a variable like so:
goal_text = "Points To Advance: " +goal;
goalhud SetText( goal_text );  


As expected, it changed nothing.

Is there a way to update text on the hud without causing frame drops in gsc? Am I doing something incorrect?
I would assume I am haha.
I'm guessing if I learned LUA, and set it up similar to the player score, I wouldn't have the issue.
I know it won't be as easy as I just said, but would LUA be my best option?

I'd appreciate any help, thanks for your time!