Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Steeveeo

Stickybombs. Possible? (GZDoom)

Recommended Posts

GZDoom 1.0.24

I made a grenade launcher that fires Frag grenades as primary fire and slightly Halo style Plasma grenades as Altfire.

My question is, how do I get the Plasma grenades to stick to all actors (if possible, all monsters at least) on contact, but not stick to walls?


(Also, a related question, how to get Grenades to explode and not bounce off of actors like the Barrel? Seems weird when a grenade bounces off of a nukage barrel and the barrel explodes)

Share this post


Link to post
TheDarkArchon said:

You can't

Then let's ask the programmers! Heit, Quasar, Zahl...

Share this post


Link to post

Bouncing/sticking goes well beyond what's already "in" Doom's engine, and thus cannot be done just with dehacked.

Share this post


Link to post

I guess a "sticky" effect could be emulated if, upon contact, a grenade/missile actor would somehow "keep homing" to its target without actually overlapping. This way, it would sort of "keep close" to its target, much like a magnet pulling another (assuming that if it got too close, it would get stuck with its target and immobilize both).

If there are already "homing missiles" implemented, and the hitting effect can be changed, that's the closes you could get to stickiness (imagine a revenant missile that "sticks" on you and explodes 5 seconds later, instead of immediately).

Share this post


Link to post

Yes, I've tryed that...I dont want the grenades to home in, just stick...

But it seems I have crashed headlong into another GZDoom barrier...

Maybe one of them coders can get this workin right! (*cough*zahl*cough*)

I heard EDGE had some cool features...anyone know if it would be possible there? And if so, a link to a list of its features?

Share this post


Link to post

The main obstacle is trying to define "sticking" in terms of the Doom engine peculiarities, physics, and limitation.

The closest you can get to two objects being "stuck" without REALLY being stuck into each other, is to keep them close but without their active radii overlapping. If that ever happens, they will both be stuck and won't be able to move.

If by "stuck" you meant something like e.g. patching, merging two sprites or adding a decal to a sprite, tough luck, that would require some major engine hacks.

The closest you could get, using existing Doom features, is, as I said, to make "grenade" objects "orbit" really close to their target upon contact (they could have a coded radius of 0 or 1, while visually they could be larger), thus giving the illusion of something "stuck" (it would look more like something magnetically attracted to a sprite, and sliding all over it, although the two objects could be somehow "locked" to each other).

So much should be enough for stickiness purposes, but I don't know if you seek a visually perfect effect too (like e.g. a 3D object merging with another 3D object, and attaching at the correct angle etc.), that really is too much for even the best scripted Doom engine available and has more to do with visualization and 3D.

Share this post


Link to post

With EDGE you could always make being "hit" by the sticky bomb kill the enemy, and immediatley spawn another enemy with the same sprite but with the bomb "stuck to it". This enemy would then "live" as normal and explode after a set time. The downside being the bombs would have to kill every enemy in one hit

Share this post


Link to post

Sticky Bombs are possible using ZDoom. I recall a LittleWhiteMouse wad where you could use a bow and arrow and stick them into people. You could use the same principle and make a bomb that "sticks" to things as well, then blows up after a time.

Share this post


Link to post

@Meas: As I said before, I have done the homing stick with seeker missiles before...but they have to be pointed directly at the target and home in before they can, and the rocket has to have a radius and height of 0.

@SS and DA: That might be an interesting thing to try


IDEA FLASH! How could I implement A_Fire to make a stickybomb? AFAIK it places the calling actor directly in front of the target using the parameters brought up from A_Vilechase or somtm.

Share this post


Link to post

The Arc of Death in Hexen has some kind of stickiness to it. Once it hits an enemy, it hangs around for a while doing damage, although it's possible to outrun it. A few minor changes might be able to fix that.

Share this post


Link to post

dont have Hexen...is it in the wiki?

Most of the hexen, heretic, and strife stuff in the zdoom.org wiki is in red (meaning it needs a page behind it) in the Heirarchial Class list, or no link in the main class list...

Share this post


Link to post

We tried VERY HARD to make a Prox Launcher for Sabbat Martyr Deathmatch...but to no avail. However, it worked in SP...just not in an online enviroment (it did...but it was really buggy :/). It was done through DECORATE...if I can remember, I'll pass the code your way, once I'm able to get on my own computer.

Eh, I guess just to make sure...it was supposed to function like the Prox Launcher in Q3TA...would that code help you any for what your trying to do?

Share this post


Link to post

@Ichor: No coding on that page...I need coding...not a description...

@Mech: Sure, anything would help!

Share this post


Link to post

Ok, I'll have to take a look at the source code for that.

Share this post


Link to post

I don't know anything at all about decorate, but here's the A_ZapMimic code from the source if that will help:

void A_ZapMimic (AActor *actor)
{
	AActor *mo;

	mo = actor->lastenemy;
	if (mo)
	{
		if (mo->state >= mo->DeathState)
		{
			P_ExplodeMissile (actor, NULL);
		}
		else
		{
			actor->momx = mo->momx;
			actor->momy = mo->momy;
		}
	}
}

Share this post


Link to post

The Hi res pak for Zblood has a weapon projectile that will stick on to your enemy for a while before exploding. the wad name is bludhirzfinal.wad. I'm not sure where to find it, so if you want it, I can send it to you.

Share this post


Link to post

sweet, what you described is the effect I wanted!

So is it not on the /idgames archives?

EDIT: Guess not, it aint there, and theres nothing on Google about it...

Share this post


Link to post
Xaechireon said:

The Hi res pak for Zblood has a weapon projectile that will stick on to your enemy for a while before exploding. the wad name is bludhirzfinal.wad. I'm not sure where to find it, so if you want it, I can send it to you.


Well the way he described it is exactly what I had in mind with the "pseudo-homing really close to you" missile thing I described. You can't get anything closer to "sticking" than that, unless you meant that the sprite/model should be altered too...heh, no can do in that case.

Share this post


Link to post

I knew it had somtm to do with the A_Fire command!

Thx for the wad Xae!

But now I bugged it up, it sticks to walls just fine and all, but you have to be pointed directly at the target to make it stick. Not very useful for realism if your target is far away...Also, if you are, but at a distance, if you're aimed at the target, even if it hits the ground it will "stick" to the enemy anyway...

Oh well, if anyone has any suggestions then please, feel free to help out!

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×