GSC reference › Built-in
SetModel()
Built-in (engine)
Server
Called on: entity
Set the model for the entity
Signature
<entity> SetModel(<model alias>)
Called on an entity: entity SetModel(...)
Parameters
| Name | Required? | Details |
|---|---|---|
| model alias | Required | Name of the model |
Example (from Treyarch's docs)
raps_meteor SetModel( "veh_t7_drone_raps" )
Real uses in BO3's scripts
Called 800 times in the decompiled scripts. A few, zombies first:
- scripts/zm/_electroball_grenade.gsc, line 508
self setmodel("tag_origin"); - scripts/zm/_zm_ai_margwa_elemental.gsc, line 1436
var_898f5d33 setmodel("tag_origin"); - scripts/zm/_zm_ai_mechz_claw.gsc, line 386
self.m_claw setmodel("c_t7_zm_dlchd_origins_mech_claw"); - scripts/zm/_zm_ai_napalm.csc, line 168
effectent setmodel("tag_origin"); - scripts/zm/_zm_ai_napalm.gsc, line 1027
effectent setmodel("tag_origin");
Related built-ins
- SetUIModelValue()Sets a UIModel from the model being passed in.
- CreateUIModel()Creates and returns a UIModel from a parent model.
- GetUIModel()Returns a UIModel from the parent model passed in and the name of the model to retrieve.
- ForceStreamXModel()Forces the streamer to load model and texture LODs for a model even if it isn't yet visible.
- GetUIModelForController()Returns the UIModel from the controller root.
- HideMiscModels()Hide all misc models with this targetname
- PlayViewmodelFX()
- SetControllerUIModelValue()Sets a data value for a given lui menu, the data name has to be precached and the value as well, if its a string.
- FindStaticModelIndexArray()Returns an array indices of a static model whose name matches the passed in string
- HideStaticModel()Hide a static model
- StopForceStreamingXModel()Forces the streamer to load model and texture LODs for a model even if it isn't yet visible.
- ShowMiscModels()Show all misc models with this targetname
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).