Good afternoon, all right? I'm starting with the scripting right now and have several questions regarding some bases functions that I have not found anywhere, even in the scripting reference here from UGX... As an example, this excerpt below:
Code Snippet
Plaintext
level.DLC3 = spawnStruct(); // Leave This Line Or Else It Breaks Everything
What would be the "level" and what is the spawnStruct() function? Is there any place where I can find these references?
Level is the same thing as a global. It exists everywhere and can be accessed whenever.
SpawnStruct allocates a certain amount of data for that specific variable, it's different from initializing it as an array. You might find a better description on the scripting reference here or on zeroys script reference.
Level is the same thing as a global. It exists everywhere and can be accessed whenever.
SpawnStruct allocates a certain amount of data for that specific variable, it's different from initializing it as an array. You might find a better description on the scripting reference here or on zeroys script reference.
I searched here in reference but did not find these functions: \
Level is the same thing as a global. It exists everywhere and can be accessed whenever.
...however the things that you associate with it can only be accesses after they have been declared. Attempting to access the level variable(say level.DLC3) before it is declared will result in an undefined/uninitialized variable.
Quote
SpawnStruct allocates a certain amount of data for that specific variable, it's different from initializing it as an array. You might find a better description on the scripting reference here or on zeroys script reference.
To my understanding, spawnStruct() just spawns a script_struct. Meaning you can give it a targetname, script_noteworthy, or script_string and get it from in-game(it presumably spawns at (0, 0, 0).
I searched here in reference but did not find these functions: \
But thank you very much, helped a lot!
there are aton of functions that arent engine based, those are the ones that tend to not show up in refrences. I just recommend looking at the #includes' files. they usually contain the functions that arent server based... actually they DO contain
there are aton of functions that arent engine based, those are the ones that tend to not show up in refrences. I just recommend looking at the #includes' files. they usually contain the functions that arent server based... actually they DO contain
...however the things that you associate with it can only be accesses after they have been declared. Attempting to access the level variable(say level.DLC3) before it is declared will result in an undefined/uninitialized variable.
To my understanding, spawnStruct() just spawns a script_struct. Meaning you can give it a targetname, script_noteworthy, or script_string and get it from in-game(it presumably spawns at (0, 0, 0).
Many thanks for the tips! I have one more question... When I have to change any original file, for example the archives of folder raw/maps, as _zombiemode_perks.gsc to change the perks... How should I do? Why give not change all game maps? Or should I edit another file?
If you want to override any non-DLC3 map you're going to have use its script as you should be on DLC3 mod tools. Whenever you want to edit an existing file for only a specific map/mod you'll have to copy that file and it's location (I.e. Raw/Maps/_zombiemode_perks.gsc would go in mod/modname/maps/_zombiemode_perks.gsc, NOTE: may not apply to all asset types such as fonts, fonts lose their inner folder).
If you want to override any non-DLC3 map you're going to have use its script as you should be on DLC3 mod tools. Whenever you want to edit an existing file for only a specific map/mod you'll have to copy that file and it's location (I.e. Raw/Maps/_zombiemode_perks.gsc would go in mod/modname/maps/_zombiemode_perks.gsc, NOTE: may not apply to all asset types such as fonts, fonts lose their inner folder).