Page MenuHomeFeedback Tracker

Cannot set object material when not pristine
Assigned, NormalPublic

Description

I've recently ran into a problem when I try to dynamically apply textures to items by using the SetObjectTexture and SetObjectMaterial Methods to set them from script.
The problem is, that the engine seems to overwrite any changes when the item is no longer pristine with the paths set in the healthLevels list configured in the DamageSystem class for the item in the config.cpp.
For most items this is not a problem, because most items only replace rvmats and in most cases I only need to set a new texture and no rvmat, but some items require rvmats to function properly. For example some weapons and a lot of car parts are affected by it.
I cannot even overwrite the material again when I try to call the SetObjectMaterial method after the EEHealthLevelChanged callback was invoked. It would be very cool if we can at least overwrite the Materials again in the EEHealthLevelChanged callback to use our own damage and desctruct materials

Details

Severity
Block
Resolution
Open
Reproducibility
Always
Operating System
Windows 7
Category
General

Event Timeline

LBmaster created this task.Wed, Oct 2, 12:41 PM
Geez changed the task status from New to Assigned.Wed, Oct 2, 2:17 PM