Doggo120 Posted January 4, 2013 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! 0 Share this post Link to post
TimeOfDeath Posted January 4, 2013 maybe Thing_Thrust or Thrust_Thing, whatever it's called? 0 Share this post Link to post
Shadow Hog Posted January 4, 2013 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. 0 Share this post Link to post
Cacowad Posted January 4, 2013 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 0 Share this post Link to post
Scypek2 Posted January 4, 2013 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. 0 Share this post Link to post
Shadow Hog Posted January 4, 2013 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. 0 Share this post Link to post
Doggo120 Posted January 4, 2013 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! ^-^ 0 Share this post Link to post
gggmork Posted January 5, 2013 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. 0 Share this post Link to post
Doggo120 Posted January 5, 2013 Hey that's a great idea! Maybe if I set the kickback to a negative number? 0 Share this post Link to post
Cacowad Posted January 5, 2013 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. 0 Share this post Link to post