Wazat makes cluster grenades
Moderator: InsideQC Admins
8 posts
• Page 1 of 1
Wazat makes cluster grenades
Seeing as how I was thoroughly disappointed with the cluster grenades in Dissolution of Eternity (mission pack 2), I decided to create some from scratch so we'd have cluster grenades that work. This normal-quake mod (you don't need the expansion pack) shows how I would have done it. The only thing I stole from DoE is the grenade model.
download here.
Basically, I fixed the problem with hitting an enemy directly with the main grenade. You couldn't ever really make good use of cluster grenades because monsters (and players) are too hard to lead into the trap, and if you accidentally hit them with it directly it explodes for much less damage.
My solution:
If the grenade doesn't hit anything but walls, it splits on a timer as normal.
If you hit a target, the cluster grenade still splits, but the mini-nades don't immediately explode on the target. They fall to the ground and then explode. The resulting effect is perfect, in that it carpets the area with explosions and slaughters everything in the area.
Now THAT'S a cluster grenade.
Funny that this is what finally got me to make another mod. lol!
download here.
Basically, I fixed the problem with hitting an enemy directly with the main grenade. You couldn't ever really make good use of cluster grenades because monsters (and players) are too hard to lead into the trap, and if you accidentally hit them with it directly it explodes for much less damage.
My solution:
If the grenade doesn't hit anything but walls, it splits on a timer as normal.
If you hit a target, the cluster grenade still splits, but the mini-nades don't immediately explode on the target. They fall to the ground and then explode. The resulting effect is perfect, in that it carpets the area with explosions and slaughters everything in the area.
Now THAT'S a cluster grenade.
Funny that this is what finally got me to make another mod. lol!
When my computer inevitably explodes and kills me, my cat inherits everything I own. He may be the only one capable of continuing my work.
- Wazat
- Posts: 771
- Joined: Fri Oct 15, 2004 9:50 pm
- Location: Middle 'o the desert, USA
I'm not sure if grenades call their touch function when they hit world (I presume they do), but I think that the minis should explode as soon as they touch anything. I'm not sure what exactly your code is doing, but it looks like it could be simplified...
I have a related wuestion: When something with MOVETYPE_BOUNCE is in its touch function, has its velocity already been changed?
I have a related wuestion: When something with MOVETYPE_BOUNCE is in its touch function, has its velocity already been changed?
-

Lardarse - Posts: 266
- Joined: Sat Nov 05, 2005 1:58 pm
- Location: Bristol, UK
Lardarse wrote:I'm not sure if grenades call their touch function when they hit world (I presume they do), but I think that the minis should explode as soon as they touch anything. I'm not sure what exactly your code is doing, but it looks like it could be simplified...
That could be, but I really like how I got it working and it's basically exactly how I had it planned. It might be overly complex, but I think with the goal I had in mind it gets the job done perfectly.
Lardarse wrote:I have a related wuestion: When something with MOVETYPE_BOUNCE is in its touch function, has its velocity already been changed?
Good wuestion.
At least, that's how it works if I'm remembering it right. That might have even changed with engine versions.
The other major problem with ricochet nails etc is that they love to stick to the floor, but that's another issue entirely.
When my computer inevitably explodes and kills me, my cat inherits everything I own. He may be the only one capable of continuing my work.
- Wazat
- Posts: 771
- Joined: Fri Oct 15, 2004 9:50 pm
- Location: Middle 'o the desert, USA
Urre wrote:Easily fixed by just tracelining the movement of the nail yourself
Or you can just use this thing that I've had lying around
- Code: Select all
// Returns a rebound vector off of a wall. Quite useful for richoceting stuff.
vector(vector org, vector dir, float justnorm) ReboVec =
{
local vector spot1, spot2;
local vector olddir;
local vector result;
if(justnorm)
{
traceline(org, org + dir*10, FALSE, self);
result = trace_plane_normal;
return result;
}
olddir = normalize(dir);
spot1 = org - (16*dir);
spot2 = org + (16*dir);
traceline(spot1, spot2, FALSE, self);
result = olddir-(trace_plane_normal*(trace_plane_normal*olddir)*2);
result = normalize(result);
self.origin = trace_endpos;
return result;
};
-

Dr. Shadowborg - InsideQC Staff
- Posts: 1110
- Joined: Sat Oct 16, 2004 3:34 pm
Or you can just use this thing that I've had lying around Razz :
/me steals your code and gives an evil laugh
- Code: Select all
// Returns a rebound vector off of a wall. Quite useful for richoceting stuff.
vector(vector org, vector dir, float justnorm) ReboVec
/me steals your code and gives an evil laugh
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC
(LordHavoc)
-

frag.machine - Posts: 2090
- Joined: Sat Nov 25, 2006 1:49 pm
8 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest
