I would like to be able to run code in the map's config function. The config function is like the main function but it runs prior to the lobby being joinable. My primary use case for this is to play a song in the map lobby. See this post for more info: https://www.hiveworkshop.com/threads/vjass-advanced-initialization.247590/#post-2682339
I can imagine this being accomplished by introducing an annotation @config that, when added to a function, flags it to be run during the map configuration or by introducing a new config scope, like the init scope, where all code within is injected into the map's config function. I've never heard of anyone using the config function to do anything other than play a sound in the lobby so explicitly tagging a single function might make more sense than introducing a new scope.
I would like to be able to run code in the map's
configfunction. Theconfigfunction is like themainfunction but it runs prior to the lobby being joinable. My primary use case for this is to play a song in the map lobby. See this post for more info: https://www.hiveworkshop.com/threads/vjass-advanced-initialization.247590/#post-2682339I can imagine this being accomplished by introducing an annotation
@configthat, when added to a function, flags it to be run during the map configuration or by introducing a newconfigscope, like theinitscope, where all code within is injected into the map'sconfigfunction. I've never heard of anyone using the config function to do anything other than play a sound in the lobby so explicitly tagging a single function might make more sense than introducing a new scope.