I think I have a bit of a skewed idea of precaching. In ms.stx, I find:
I was under the impression that precache only worked under the game_precache event, though in effects/sfx_poison_burst I find that there are precaches in the initial open brackets: ( I dunno what they're called )
I assume that precache still works. Is it bad practice to have those precaches in those brackets instead of game_precache? What is the scope of precachefile? Does it get all "precache" commands, or only those in game_precache? What would be the point of an effect like that using the precache, unless it's supposed to be captured by the precachefile?
Also, in the scripts_read_me.txt there are these entries:
I don't understand how #included scripts aren't precached. Since it isn't, do I have use "precachefile" in game_precache? By "...works on a different parser... and does not parse quotes proper," does that mean I'm not allowed to put quotes around what I'm precaching? Like:
Code:
precache //<file> - precache media, beware, this happens before script loads, and happens even if commented
precachefile //<scriptname> - precache all media in a script - usually only works inside game_precache - it does not work via cascade (ie. a precachefile command in a top script will not catch any precachefile command in the script it precaches, so any such will need to be duplicated in the top script.)
game_precache //precachefile events will work here!
Code:
{
...
const SOUND_BURST ambience/steamburst1.wav
precache SOUND_BURST
}
Also, in the scripts_read_me.txt there are these entries:
Code:
• Media (sounds/models/sprites) in #include'ed scripts must precached by the top script.
• The 'precache' command works on a different parser. It therefore will be activated inside comments, and does not parse quotes proper.
Code:
{ game_precache
precache "monsters/chumtoad.mdl"
//This is bad
}
{ game_precache
precache monsters/chumtoad.mdl
//This is good
}