View previous topic :: View next topic |
Author |
Message |
skite2001

Joined: 17 Nov 2008 Posts: 17
|
Posted: Wed Nov 19, 2008 4:59 pm Post subject: Adding Flies over dead bodys like in QRACK 1.9?(Darkplaces) |
|
|
Hello,
i would like to ask, if it would possibe to add flies over killed (dead) bodys, as seen on the actual QRACK 1.9 or sure, Quake 2.
Using Drakplaces Engine and want to add these "feature" to my effects-mod...if possible to do so. |
|
Back to top |
|
 |
scar3crow Inside3D Staff

Joined: 18 Jan 2005 Posts: 837 Location: Las Vegas, NV
|
Posted: Wed Nov 19, 2008 5:08 pm Post subject: |
|
|
The only difficult part really is getting the media for the flies, be it via a particle effect (such as in Q2), or models (such as in Unreal) or a just a looping sprite animation. Then you need a fly buzzing sound. The only thing that is left is to associate these assets with any corpse over a period of time (delays are nice, longer delays with natural variation are better). You'll probably want to position the assets a little bit above the corpse, to help circumvent awkwardness of corpses on thin surfaces and such.
I also have no clue how Qrack does it as I don't really use the engine, so I'm going off of Q2/Unreal style. |
|
Back to top |
|
 |
skite2001

Joined: 17 Nov 2008 Posts: 17
|
Posted: Wed Nov 19, 2008 6:08 pm Post subject: |
|
|
qrack does it via png particle.
the resources are no problem, i already got the fly pngs and sound
look here:
http://www.mediafire.com/download.php?yiyk1mtnnhm
...but how to get it working ingame??? |
|
Back to top |
|
 |
scar3crow Inside3D Staff

Joined: 18 Jan 2005 Posts: 837 Location: Las Vegas, NV
|
Posted: Wed Nov 19, 2008 6:59 pm Post subject: |
|
|
Despite my label of Inside3d Staff, I'm not exactly a coder, so take what I say with a grain of salt (and hope someone else responds to this thread).
Basically what you need to do is create a non-solid entity with no velocity that has a null model, citing the fly png particles as the self.effects (how easy this is I do not know, I've never mucked about in anything regarding new effects), and looping the fly buzzing sound. This entity should be created by a monster when they are verified as dead (self.health < 1, movetype = movetype_none etc) and created say 32 units above their origin. For a bit of flourish you can keep track of the time since the monster died and add a random value so it feels less automated, more natural.
I'd suggest digging around in whatever code you can find for behavior that happens once a monster is dead, and for behavior where one entity creates another and how to offset location. |
|
Back to top |
|
 |
Electro
Joined: 29 Dec 2004 Posts: 241 Location: Brisbane, Australia
|
Posted: Thu Nov 20, 2008 1:04 am Post subject: |
|
|
A non-particle way to do it would be to put that png into a spr (sprite). Then create an entity like scar3crow said and set it's .model to be the .spr file.
Making it move is a little bit more code than that, but not a great deal. _________________ Unit reporting!
http://www.bendarling.net/ |
|
Back to top |
|
 |
|