arma2:texturing:hiddenselectionstextures
Differences
This shows you the differences between two versions of the page.
Previous revisionLast revision | |||
— | arma2:texturing:hiddenselectionstextures [2011/07/01 13:47] – added soldier hiddenselectionstextures header. snakeman | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== hiddenSelectionsTextures ====== | ||
+ | See also [[arma: | ||
+ | |||
+ | |||
+ | ====== hiddenSelections[] ====== | ||
+ | |||
+ | CfgVehicles | ||
+ | |||
+ | Defines selections on the model, which are not shown at mission startup. | ||
+ | |||
+ | This is useful for creating variations of one model, where the different selections are left out with hiddenSelections. VBS2 uses the " | ||
+ | <code cpp> | ||
+ | hiddenSelections[] = {" | ||
+ | </ | ||
+ | |||
+ | Selections to be hidden must be defined as **sections** in the model.cfg (in the sections[] array within cfgModels). Once set up,the texture of a hidden selection can be changed during run-time using scripting commands such as " | ||
+ | |||
+ | To make config.cpp files easier to read and write a number of defined strings have been provided. You can use the predefined string in place of the numerical value, e.g., | ||
+ | <code cpp> | ||
+ | hiddenSelections[] = {" | ||
+ | </ | ||
+ | |||
+ | Predefined Strings [people_defines.hpp]: | ||
+ | <code cpp> | ||
+ | STANDARD_PEOPLE_SELECTIONS = " | ||
+ | STANDARD_SOLDIER_SELECTIONS = " | ||
+ | </ | ||
+ | Note: the actual selections need to be named in the p3d model, i.e., " | ||
+ | |||
+ | Known bug: After restoring a saved SP game, all hiddenSelections revert to their original texture | ||
+ | |||
+ | |||
+ | ====== hiddenSelectionsTextures[] ====== | ||
+ | |||
+ | CfgVehicles | ||
+ | |||
+ | Allows you to assign a texture to a hidden selection which will be visible once the simulation is started (instead of being hidden). The ordering matches that of the hiddenSelections[] array. (So, the first hidden selection will take the first texture listed in the hiddenSelectionsTexture[] array, and so on. HiddenSelections elements without a corresponding entry in the hiddenSelectionsTextures array will remain hidden.). | ||
+ | <code cpp> | ||
+ | hiddenSelections[] = {" | ||
+ | |||
+ | hiddenSelectionsTextures[] = {__CurrentDir__\data\civ_suit_black_co}; | ||
+ | </ | ||
+ | |||
+ | In the example above, the hiddenSelectionsTextures applies the first listed texture to the first selection in the hiddenSelections array, i.e., the " | ||
+ | |||
+ | Where this parameter is powerful is the ability to now add another person class with a different colored suit, using the same p3d model, e.g., | ||
+ | <code cpp> | ||
+ | hiddenSelectionsTextures[] = {__CurrentDir__\data\civ_suit_greystripes_co}; | ||
+ | </ | ||
+ | |||
+ | |||
+ | ====== hiddenSelectionsRandomTextures[] ====== | ||
+ | |||
+ | CfgVehicles | ||
+ | |||
+ | Randomly assigns a texture to a hidden selection. Similar to the hiddenSelectionsTextures[] array, only it is an array of arrays of textures, each " | ||
+ | <code cpp> | ||
+ | hiddenSelections[] = {" | ||
+ | hiddenSelectionsTextures[] = {__CurrentDir__\data\afg_robeblack_co,"","" | ||
+ | |||
+ | hiddenSelectionsRandomTextures[] = | ||
+ | { | ||
+ | //robe | ||
+ | { | ||
+ | __CurrentDir__\data\afg_robeblack_co, | ||
+ | __CurrentDir__\data\afg_robeblue_co, | ||
+ | __CurrentDir__\data\afg_robebrown_co, | ||
+ | __CurrentDir__\data\afg_robepink_co, | ||
+ | }, | ||
+ | |||
+ | //vest | ||
+ | { | ||
+ | __CurrentDir__\data\afg_equip_co, | ||
+ | "", | ||
+ | }, | ||
+ | |||
+ | //scarf | ||
+ | { | ||
+ | __CurrentDir__\data\afg_scarfblack_co, | ||
+ | __CurrentDir__\data\afg_scarfblue_co, | ||
+ | __CurrentDir__\data\afg_scarfbrown_co, | ||
+ | "", | ||
+ | "", | ||
+ | "" | ||
+ | } | ||
+ | }; | ||
+ | </ | ||
+ | |||
+ | Empty quotes ("" | ||
+ | |||
+ | |||
+ | ====== Soldier hiddenSelections ====== | ||
+ | |||
+ | <code cpp> | ||
+ | hiddenSelectionsTextures[] = | ||
+ | { | ||
+ | " | ||
+ | }; | ||
+ | |||
+ | class EventHandlers: | ||
+ | { | ||
+ | init = " | ||
+ | [ | ||
+ | 0, | ||
+ | [ | ||
+ | "" | ||
+ | "" | ||
+ | "" | ||
+ | "" | ||
+ | "" | ||
+ | ] | ||
+ | select floor random 5 | ||
+ | ]"; | ||
+ | }; | ||
+ | </ |
arma2/texturing/hiddenselectionstextures.txt · Last modified: 2024/08/02 10:31 by snakeman