Nuclide
Software Development Kit for id Technology (BETA)
precacheAPI_t Struct Reference

Public Member Functions

float Model (string pathToModel)
 Precaches a given model file and additional helper files. More...
 
float Sound (string soundDef)
 Precaches a given sound def or sample. More...
 
float Particle (string particleEffect)
 Precaches a given particle effect. More...
 
float Entity (string className)
 Precaches a given entity class. More...
 

Member Function Documentation

◆ Entity()

float precacheAPI_t::Entity ( string  className)

Precaches a given entity class.

Ensuring models, sounds and other assets referenced within are loaded ahead of time.

Parameters
classNameto precache
Returns
Success.

◆ Model()

float precacheAPI_t::Model ( string  pathToModel)

Precaches a given model file and additional helper files.

precache.Model("models/weapons/v_pistol.vvm");

Parameters
pathToModelto precache
Returns
modelindex value.

◆ Particle()

float precacheAPI_t::Particle ( string  particleEffect)

Precaches a given particle effect.

The following loads r_part impactSpark from particles/weapon_laser.cfg.

`precache.Particle("weapon_laser.impactSpark");

Parameters
particleEffectto precache
Returns
particle effect num.

◆ Sound()

float precacheAPI_t::Sound ( string  soundDef)

Precaches a given sound def or sample.

precache.Sound("Foo.Bar"); precache.Sound("foo/bar.wav");

Parameters
soundDefto precache
Returns
sound def id.

The documentation for this struct was generated from the following file: