|
Here is a tutorial that will allow you to change the particle trail on the rocket launcher and give a general overview on how to change any of the other particle trails. Step 1 Open up g_weapon.c and locate the code segment that says : /* ================= fire_rocket ================= */ then find the function: void fire_rocket (edict_t *self, vec3_t start, vec3_t dir, int damage, int speed, float damage_radius, int radius_damage) then find the line: rocket->s.effects |= EF_ROCKET; This line tells the computer to give the rocket model the particle stream that ID created for the rockets. To change it to a different stream you need to change "EF_ROCKET". Step 2 To find out what you can change it to open q_shared.h and find the line: #define EF_ROCKET 0x00000010 // redlight + trail It should be right in the middle of a whole bunch of other #define EF_something statements. There should be about 16 of these statements starting with EF_ROTATE to EF_PENT. Step 3 All you need to do to change the particle stream is choose another statement. For example replacing EF_ROCKET with EF_GIB will change the stream to a blood trail. The ones that I know will work are the gib, blaster, rocket, grenade, hyperblaster, bfg, quad, and pent. If someone tries some of the other ones please tell me what happens. Step 4 Compile..replace the dll.. run..this has all been explained before Ending You can also change player and monster muzzle flashes by replacing the MZ_weapon and MZ!_weapon segments throughout the code and Temporary entity events like explosions and spark by chaging the TE_whatever segments. I haven't tried these out yet but I think that they work in the same way. Try it out and tell me how it goes. Just look through this header file (q_shared.h) and see what else can be changed. Happy Coding!!!!! p.s. if you replace EF_ROCKET with TE_RAILTRAIL you get some sort of gimpy rocket with a blood trail. If anyone knows why (besides the fact that EF and TE are different effects, one temporary and the other is a state that lasts longer) please tell me.
Tutorial html
coding modified by legion.
If it is created,
then it is copyrighted. Quake 2 Tutorial #7 is (c)1997-98 by Samuel Schroeder
and the Inside3D staff. The site is hosted by the one and only TeleFragged. Please direct any
flames, comments, or praises to the author. Any and all
information found in this tutorial may
be used in any Quake modification provided that the author and
the Inside3D staff are credited.