Page 1 of 1

Weapon help for Multiplayer

Posted: Tue Feb 13, 2007 9:44 pm
by Theshooter7
I need an answer, quick!

Sabbat Martyr Deathmatch is going to be released soon, but we have a problem with one of the new weapons: Whenever someone is fragged by a proxy mine, it counts as a suicide for the one who tripped it. Is there any way to fix this code so that is still holds ownership? Thanks in advance.
Spoiler:

Posted: Tue Feb 13, 2007 11:29 pm
by Matt
I don't see anything that would make it do that o_O

Have you tried using A_JumpIfCloser instead of a melee state?

EDIT: I am dumb and thought that the weapon launched ProxProj1.

Sorry, dude, I've got this problem myself and just decided not to make anything deathmatch-related that involved such a projectile. Have you tried aimmode 4 when spawning the exploder?

EDIT3: No, that's not it either... using the same missile for both effects gives the same result. Seems like an exploding missile uses its hate target as its owner...

Posted: Wed Feb 14, 2007 11:44 am
by StrikerMan780
Hmm, I will check about jumpifcloser.

Posted: Wed Feb 14, 2007 11:48 am
by Theshooter7
I already tried that, Striker. It will only Jump for the one who fired it. :(

Posted: Wed Feb 14, 2007 3:41 pm
by Zippy
That's because A_JumpIfCloser checks the distance between the calling actor and its target. The target of a projectile is the actor who fired the original projectile.

Posted: Wed Feb 14, 2007 10:17 pm
by XutaWoo
Can't you do +DOOMBOUNCE and bouncefactor 0.1, or something like that, so when the target touches it it explodes?

Posted: Thu Feb 15, 2007 12:20 am
by Matt
...that's it! :D!

Have the original projectile land, then spawn a new, invisible one that watches and chases people. When the new one notices a target get close, it goes to A_KillMaster and disappears, while the original one then explodes.

If you want a different death state for the thing being destroyed but not detonated, give it twice the health you want it to "really" have and use A_JumpIfHealthLower to have it go to an alternate death state.

Note: the above has NOT been tested. I might later tonight, though.

Posted: Thu Feb 15, 2007 12:41 am
by Project Shadowcat
I think the idea is to try to only use the original projectile, and only the original projectile. That will be the only way to score a kill.

Posted: Thu Feb 15, 2007 1:19 am
by Matt
I tried that and it didn't work... once the original projectile changed its hate target, whatever it killed would be attributed to that hate target.

Also, my solution above doesn't work. Once the second actor spawns it takes the projectile as its hate target instead of inheriting the projectile's hate target. So it just sits there staring at the original missile, or explodes immediately if I have it armed like the final version ought to be.

Is there some way to clear an actor's hate target?

EDIT: And, in retrospect not surprisingly, A_KillMaster doesn't work no matter what I do.

Posted: Thu Feb 15, 2007 3:07 pm
by Theshooter7
I already tried Vaecrius' Idea last night. It does work, but for some reason the monster wants to try to attack the mine or something. Therefore, the mine sets and instantly explodes.

XutaWoo's Idead was just brought up by the team. We are going to undergo a test with that method to see if it works the way we want it to.