TE EXPLODEMODEL
Revision as of 20:33, 13 September 2025 by Outerbeast (talk | contribs)
Spawns multiple rotating models with gravity, collisions, particle trails, and flashing orange lights.
void te_explodemodel(Vector pos, float velocity,
string model="models/hgibs.mdl", uint16 count=8, uint8 life=32,
NetworkMessageDest msgType=MSG_BROADCAST, edict_t@ dest=null)
{
NetworkMessage m(msgType, NetworkMessages::SVC_TEMPENTITY, dest);
m.WriteByte(TE_EXPLODEMODEL);
m.WriteCoord(pos.x);
m.WriteCoord(pos.y);
m.WriteCoord(pos.z);
m.WriteCoord(velocity);
m.WriteShort(g_EngineFuncs.ModelIndex(model));
m.WriteShort(count);
m.WriteByte(life);
m.End();
}
Vector posCenter point for the effectfloat velocityEjection speed for all modelsstring modelModel to displayuint16 countNumber of models to spawnuint8 lifeTime to display all models (seconds * 0.1)
