Skip to content

TE_EXPLODEMODEL

GeckoN edited this page Jan 26, 2017 · 4 revisions

Spawns multiple rotating models with gravity, collisions, particle trails, and flashing orange lights.

Parameters

Type Name Description
Vector pos Center point for the effect
float velocity Ejection speed for all models
string model Model to display
uint16 count Number of models to spawn
uint8 life Time to display all models (seconds * 0.1)

API Function

No API function exists as of SC 5.02

NetworkMessage Function

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();
}
Clone this wiki locally