[Release][ZM] Origins Gungame+Spawnroom challenge
-
Description
Hi everyone, this script adds a fun challenge to the game, the player will be restricted to the spawnroom on Origins. Every 16 kills the player makes, he will get a new weapon and when he has completed all of the weapons the player will get some fun upgraded weapons to finish the game.
This challenge is not that difficult and I find it perfect for hanging out while listening to music or whatever.
TypeScript
The cool thing about this script is that it was written in TypeScript instead of GSC! I've done this using my own TypeScript to GSC transpiler which you can try out for yourself here. typescript-to-gsc is in a very early prototyping stage and this script basically serves as a proof of concept. If you are interested in this, please take a look at the source file which is in the github repo and see for yourself how easy and readable TS_GSC makes scripting.
-
HasjBlok Just an FYI setText() is not safe to use for infinite unique strings. Once zombie count reaches a high enough value the game will error with a Configstring Overflow error on localized strings. You can see the amount of remaining localized strings available in the configstring pool ingame by using the configstrings command in the console.
-
JezuzLizard Ive been stuck on this issue for so long, what do you recommend for fixing it? Do I separate the hud element into two parts, the label and the value and do it that way or would I just run into the same error again?
-
HasjBlok In this case I would use a label and setValue() since only the value of the zombies count needs to be changed. The label field can also cause the error if you change it to too many unique string values, but if you use it as a static string which is only set once then it would be fine.
-
JezuzLizard Alright I'll fix that issue tomorrow then thank you so much for helping me understand this!
-
JezuzLizard I added your suggestion and it doesn't crash anymore, once again thank you so much. Ive updated the download links to the new versions so everything should be good now.