forked from baso88/SC_AngelScript
-
Notifications
You must be signed in to change notification settings - Fork 0
TE_EXPLODEMODEL
wootguy edited this page Nov 29, 2025
·
4 revisions
Spawns multiple rotating models with gravity, collisions, particle trails, and flashing orange lights.
| Type | Name | Description |
|---|---|---|
| Vector | pos | Center point for the effect |
| float | velocity | Ejection speed for all models |
| const char* | model | Model to display |
| uint16_t | count | Number of models to spawn |
| uint8_t | life | Time to display all models (seconds * 0.1) |
void te_explodemodel(Vector pos, float velocity,
const char* model="models/hgibs.mdl", uint16_t count=8, uint8_t life=32,
int msgType=MSG_BROADCAST, edict_t* dest=NULL)
{
MESSAGE_BEGIN(msgType, SVC_TEMPENTITY, dest);
WRITE_BYTE(TE_EXPLODEMODEL);
WRITE_COORD(pos.x);
WRITE_COORD(pos.y);
WRITE_COORD(pos.z);
WRITE_COORD(velocity);
WRITE_SHORT(MODEL_INDEX(model));
WRITE_SHORT(count);
WRITE_BYTE(life);
MESSAGE_END();
}