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

Pushing Monsters?

Recommended Posts

Heppy New Year Doom lovers!

I'm working on some weapons and I was wondering if I can push monsters away from me with no damage. Maybe something similar to A_Recoil but with monsters... Ahhhh!!!

...Thank you guys!

Share this post


Link to post

ThrustThing? That could work. Although, I've had issues with it in DECORATE, where it only thrusts in the direction the activator. I suppose this wouldn't be an issue for a weapon?

I mean, my specific scenario: I was trying to port Greenflower Zone 1 to ZDoom for the helluvit (since the software renderer supports 3D Floors now, and SRB2 goes crazy with them). I'd basically made the springs Inventory classes that would enter the Pickup state when enterred, thrust the player up the relevant amount (cribbed from the game's source code) and then terminate with "fail" so it wouldn't be removed from the world. For vertical springs, this much was fine, but for diagonal ones, I had no means of telling what direction the spring Thing was facing, as all values I could fetch would be based on the player that touched it instead. This meant you'd be thrusted in whichever direction you were facing and not the one the spring was facing, which... wasn't right. Worked great, otherwise.

Wasn't the only issue I'd run into, of course; there was an inescapable water pit, because SRB2's water physics are completely different (basically low-gravity sectors wherein your jump height is gimped to prevent super jumps and your movement speed gimped to simulate water pressure), but that's another matter entirely. Point is, if you use ThrustThing, expect to play around a lot with that angle number.

I was gonna suggest A_RadiusThrust with the flag RTF_NOIMPACTDAMAGE, personally, but that would thrust everything around you, even behind you, Disc of Repulsion-style, and I wasn't sure if that's what the OP wanted.

Share this post


Link to post

if you are using zdoom you can use these properties inside the weapon definition:

if it is a melee weapon:

   - Weapon.KickBack amount 

    //How far attacks by this weapon push the enemy back. Damage is also a factor in kickback. 
if it is a long-ranged weapon you can set this into the missile definition:
   - ProjectileKickBack value 

    //Similarly to Weapon.KickBack, this affects how far the projectile will push its target upon impact. This property overrides a weapon's kickback for projectiles thrown by weapons. 
as far as i can remember this should work even with 0 damage missiles or weapons.

you can find other useful actor properties: here: http://zdoom.org/wiki/Actor_properties

Share this post


Link to post

Do you really need decorate to use springs? I think that Sonic Doom had pretty good springs without using things, and that inventory item trick sounds like a weird hack.

Share this post


Link to post

Springs are Thing-based in the source material, so yeah, kinda. The inventory method is hacky, but it's a surefire way to get it to execute on contact with the Thing.

Haven't played Sonic Doom in a good while; actually don't recall any springs... I'll have to look at it sometime.

Share this post


Link to post

The ProjectileKickBack property worked!!! I had to set the damage to 1 though... but well, that gave a sweet twist to the weapon :D

Thanks! ^-^

Share this post


Link to post

Makes me think of possibly some sort of 'gravity' gun that attracts monsters toward you, maybe like mortal kombat's scorpion's "get over here" attack or something.

Share this post


Link to post

i have seen something similar in a weapons pack... very dangerous to do aganist a cyberdemon eheh.

anyway there is a monster that do it natively, is the loremaster from strife, but i can see no useful information about his functioning on the wiki, maybe is hardcoded into the "loreshot" class.

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
×