STEAM GROUP
Left 4 Dead 2 Workshop Beta L4D2WSB
STEAM GROUP
Left 4 Dead 2 Workshop Beta L4D2WSB
4
IN-GAME
30
ONLINE
Founded
15 October, 2012
shotgunefx 12 Jul, 2013 @ 11:45am
Crashes including stock entity groups
Not really grokking what's going on here.

When I include a stock entity group, the game crashes on mutation load with a precache error, even though I'm not spawning anything at all yet.

Basically, my own groups work fine (not packed in vpk), but if I add any of the stock ones, BOOM.

So for instance, if I include the following
IncludeScript("entitygroups/ammo_cabinet_group", g_MapScript); IncludeScript("entitygroups/landmine_group", g_MapScript); IncludeScript("entitygroups/blocknav128_group", g_MapScript); IncludeScript("entitygroups/ammo_crate_group", g_MapScript);

The game crashes with "251/ammo_crate_spawn -w eapon_ammo_spawn: UTIL_SetModel: not precached: models/props_unique/spawn_apartment/coffeeammo.mdl"

I've tried a few other ones with the same result. Now if I manually add the following after the includes

ScriptedPrecache() ScriptMode_SystemCall("Precache")

It doesn't crash. But isn't this supposed to happen in scriptmode.nut, and why are my own entities precached correctly without manually calling that? Flummoxed.
< >
Showing 1-1 of 1 comments
Neil - 119 12 Jul, 2013 @ 12:40pm 
Precache relevant models before including them. I am not aware of any kind of automatic precache-- the engine needs to be told to do a late precache unfortunately.

VSLib::Utils::PrecacheModel( model )

The vslib spawn functions automatically precache for you, so I recommend using them:

// Spawns dynamic_override prop with vphysics enabled and returns VSLib::Entity VSLib::Utils::SpawnDynamicProp( mdl, pos, ang = QAngle(0,0,0), keyvalues = {} ) // Precaches and spawns physics prop and returns the VSLib::Entity to you VSLib::Utils::SpawnPhysicsProp( mdl, pos, ang = QAngle(0,0,0), keyvalues = {} )

I use those stock functions in my stranded mutation.

EDIT: I read your post wrong, my bad. You know, I'm not sure either. I'm equally flummoxed.
Last edited by Neil - 119; 12 Jul, 2013 @ 12:41pm
< >
Showing 1-1 of 1 comments
Per page: 1530 50