How to add a particle effect or sprite t Created 7 years ago2016-12-28 09:12:48 UTC by Dallas Dallas

Created 7 years ago2016-12-28 09:12:48 UTC by Dallas Dallas

Posted 7 years ago2016-12-28 09:12:48 UTC Post #332871
Is it possible to add a particle effect or a sprite to a .mdl?

I noticed the Gargantua has its glowing red eye sprite - is this something that can be set up in the .qc of a model?

For example, say I model a lightbulb, can I add a reference to a sprite in the model so when I place the model in game I see a sprite along with the model? (say, to make a glowing effect around the bulb etc..)

This would be for vanilla unmodified goldsource.

Thanks for the help :)
Posted 7 years ago2016-12-28 09:17:02 UTC Post #332872
As far as i know this isn't possible. You can trigger muzzle flashes, but sprites and particles are something that must be handled by the game's code.

The Gargantua handles this by creating a sprite and attaching it to the monster's eye attachment.

You can use event 5002 to generate spark effects at attachment 0 though: https://github.com/ValveSoftware/halflife/blob/5d761709a31ce1e71488f2668321de05f791b405/cl_dll/entity.cpp#L366

The options string is the number of sparks to create.
Posted 7 years ago2016-12-29 14:05:44 UTC Post #332896
There is a npc called "light" in xen that turns on and off, donĀ“t know if it is what you need. :/
Posted 7 years ago2016-12-29 19:58:18 UTC Post #332898
oh wow switch, the first tame hl code makes sense
You must be logged in to post a response.