Weapon help for Multiplayer

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
Theshooter7
Posts: 456
Joined: Sun Mar 05, 2006 6:44 pm

Weapon help for Multiplayer

Post 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:
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Post 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...
User avatar
StrikerMan780
Posts: 486
Joined: Tue Nov 29, 2005 2:15 pm
Graphics Processor: nVidia with Vulkan support
Contact:

Post by StrikerMan780 »

Hmm, I will check about jumpifcloser.
User avatar
Theshooter7
Posts: 456
Joined: Sun Mar 05, 2006 6:44 pm

Post by Theshooter7 »

I already tried that, Striker. It will only Jump for the one who fired it. :(
User avatar
Zippy
Posts: 3302
Joined: Wed Mar 23, 2005 5:31 pm
Location: New Jersey

Post 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.
User avatar
XutaWoo
Posts: 4005
Joined: Sat Dec 30, 2006 4:25 pm
Location: beautiful hills of those who are friends
Contact:

Post by XutaWoo »

Can't you do +DOOMBOUNCE and bouncefactor 0.1, or something like that, so when the target touches it it explodes?
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Post 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.
User avatar
Project Shadowcat
Posts: 9369
Joined: Thu Jul 14, 2005 8:33 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: Blacksburg, SC USA
Contact:

Post 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.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Post 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.
User avatar
Theshooter7
Posts: 456
Joined: Sun Mar 05, 2006 6:44 pm

Post 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.
Locked

Return to “Editing (Archive)”