Lua:precache

From Fortress Forever Wiki
Jump to navigationJump to search


All sounds and models use in Source must be precached, or loaded into memory when the map loads. The engine will automatically precache assets that are found in Hammer, but it doesn't know about those referenced in lua. Trying to use sounds or models that were not precached will result in an error. This function is called when the map starts, before entities have been initialized. This is the place to use PrecacheModel and PrecacheSound.