SwapTextureOnRef
From GECK
(Redirected from SwapTexture)
A function included in the GECK for Fallout: New Vegas.
Contents
Description
Used to swap a texture for a particular nif block on a given reference.
Syntax
SwapTextureOnRef Ref NifBlockName PathToNewTexture
Or:
SwapTexture Ref NifBlockName PathToNewTexture
Example
SwapTexture Player "##Screen:0" "weapons\1handpistol\EuclidScreenSuccess"
Swaps the texture for the nif block named ##Screen:0 on the player to EuclidScreenSuccess.
string_var sFace string_var sExpression SwapTextureOnRef SecuritronRef "Screen01:0" ("creatures\securitron\" + $sFace + "_" + $sExpression)
Swaps the face+expression texture for the target Securitron reference. Works like SetSecuritronExpression, except this isn't savebaked; the effect is undone whenever the reference is unloaded. To keep the effect active, one may have to scan the cells for actor references and re-apply the effects upon noticing that a specific Securitron reference is now loaded.
Notes
- Do not include "Data\Textures" or "Textures\" at the start of the path to the new texture. Also be sure to not include the file extension at the end of the path. Using an invalid texture or an invalid path will result in either nothing happening, or that particular nif block turning pink.
- NifBlockName DOESN'T have to contain "##" at the start, unless the name of that particular block actually contains "##" within the model itself.
- Loading a save reverts all altered textures back to their initial state. In order to prevent this from happening, you might need to use NVSE's GetGameLoaded.