A ladder consists of one brush: func_ladder. A ladder doesn't require a visible brush nearby to be usable. Furthermore, not all ladder-representation brushes are func_illusionary.
This is how I create a brush model in my hostage AI plugin:
Code:
new ent, wall, Float:absmin[3], Float:absmax[3];
new wall_classname = engfunc(EngFunc_AllocString,"func_wall");
while((ent = engfunc(EngFunc_FindEntityByString,ent,"classname","func_illusionary")) != 0)
{
wall = engfunc(EngFunc_CreateNamedEntity,wall_classname);
// make me solid
set_pev(wall,pev_solid,SOLID_BSP);
set_pev(wall,pev_movetype,MOVETYPE_PUSH);
// make me the same size and position as func_illusionary
set_pev(wall,pev_modelindex,pev(ent,pev_modelindex));
pev(ent,pev_absmin,absmin);
pev(ent,pev_absmax,absmax);
engfunc(EngFunc_SetSize,wall,absmin,absmax);
}
This creates a func_wall over all func_illusionary entities, of the same size. Don't ask why. Basically, the requirements are: solid type is SOLID_BSP, move type is MOVETYPE_PUSH (game crashes if there is a SOLID_BSP without MOVETYPE_PUSH), and model index is the same as another brush model index (I first tried setting the model string, like you do, but it didn't work). I can't remember if the SetSize was required for it to work or not.
Anyway, I don't know if you can create a ladder of a custom size, I think you probably have to leech off of existing brush models. Also, func_ladder might use a SOLID_TRIGGER instead of SOLID_BSP.
__________________