GSC reference › Built-in
AddDuplicateRenderOption()
Built-in (engine)
Client
Gfx Called on: entity
Add a duplicate render option for the entity
Signature
<entity> AddDuplicateRenderOption(<dupeType>, <dupeMethod>, [mappedMaterialId], [dupeCull])
Called on an entity: entity AddDuplicateRenderOption(...)
Parameters
| Name | Required? | Details |
|---|---|---|
| dupeType | Required | this is one of [DR_TYPE_FRAMEBUFFER|DR_TYPE_FRAMEBUFFER_DUPLICATE|DR_TYPE_OFFSCREEN], as defined in _duplicaterender.csc. Sets the duplicate type of this call |
| dupeMethod | Required | this is one of [DR_CULL_ALWAYS|DR_CULL_NEVER], as defined in _duplicaterender.csc. Sets the render method of this call |
| mappedMaterialId | Optional | This is the mapped material id |
| dupeCull | Optional | this is one of [DR_METHOD_OFF|DR_METHOD_DEFAULT_MATERIAL|DR_METHOD_THERMAL_MATERIAL|DR_METHOD_CUSTOM_MATERIAL|DR_METHOD_FORCE_CUSTOM_MATERIAL], as defined in _duplicaterender.csc. Sets the render method of this call |
Example (from Treyarch's docs)
myEnt AddDuplicateRenderOption( DR_TYPE_FRAMEBUFFER, DR_METHOD_THERMAL_MATERIAL, DR_CULL_ALWAYS )myEnt AddDuplicateRenderOption( DR_TYPE_OFFSCREEN, DR_METHOD_CUSTOM_MATERIAL, DR_CULL_NEVER, mapped_material_id(player,"gfx_my_material_2") )
Real uses in BO3's scripts
Called 3 times in the decompiled scripts. A few, zombies first:
- scripts/shared/duplicaterender_mgr.csc, line 579
self addduplicaterenderoption(type, value, material, culling); - scripts/shared/duplicaterender_mgr.csc, line 587
self addduplicaterenderoption(type, value, -1, culling); - scripts/shared/duplicaterenderbundle.csc, line 297
self addduplicaterenderoption(type, method, materialid);
Related built-ins
- DisableDuplicateRendering()Disables duplicate rendering for the entity
- SetBodyRenderOptions()Sets the entity body, helmet and head render options.
- SetWeaponRenderOptions()Sets the weapon render options in the entity.
- GetCharacterBodyRenderOptions()Gets the body render options for this player
- GetCharacterModeRenderOptions()Calculates the packed mode render option - to be passed to SetBodyRenderOptions()
- GetCharacterHelmetRenderOptions()Calculates the packed helmet render option - to be passed to SetBodyRenderOptions()
- SetPlayerRenderOptions()Sets the player render options
- GetCharacterHeadRenderOptions()Calculates the packed helmet render option - to be passed to SetBodyRenderOptions()
- GetTopPlayersBodyRenderOptions()Returns the render options for the body for the top player in the game by index
- GetTopPlayersHelmetRenderOptions()Returns the render options for the body for the top player in the game by index
- NextPlayerRenderOption()Set the next player render option
- GetBodyRenderOptionsPacked()Gets the packed value of body render options (body type, style, colors)
New to GSC?
Start with the basics, or paste a compile error to get the fix.
Built-in descriptions, parameters and examples come from Treyarch's BO3 mod tools docs. Usage links point at shiversoftdev/t7-source (decompiled BO3 scripts).