Quantcast
Channel: ZDoom
Viewing all articles
Browse latest Browse all 3391

Scripting • [ZScript] - Workaround to write ui-scope class field from play-scope?

$
0
0
I'd like to bump a variable "GameScore" each time a particular type of inventory is collected by any player in multiplayer. However, the best place to bump GameScore seems to be Inventory.DoPickupSpecial(), which is play-scoped. Meanwhile, the best place to store GameScore seems to be my extension of BaseStatusBar, which is ui-scoped. Therefore, GameScore is not accessible to Inventory.DoPickupSpecial(), directly or indirectly.

I'm thinking that putting GameScore somewhere else is the right path, but I don't know where else to put it. Any suggestions?

Statistics: Posted by violgamba — Sun May 05, 2024 2:15 am



Viewing all articles
Browse latest Browse all 3391

Trending Articles