Jump to content

How to implement melee knockback?


NanakoMagojiro

Recommended Posts

Hi everyone. I'm trying to create a custom pushing enchantment for a melee weapon, that sends actors flying when you hit them.

 

Right now the only lead i have is Unrelenting force. I'm trying to use a duplicate of the effect VoiceUnrelentingForce03, with the delivery changed to contact, and the condition removed. But it's simply not functioning, there's no extra knockback even with a magnitude of 150.

 

Can anyone advise how i can achieve this effect? I'm new to scripting in general, but happy to learn!

Link to comment
Share on other sites

a little update. with some poking and prodding, it sort of half works. I've created a weapon which knocks over enemies with every hit. It doesn't send them flying anywhere though, they just crumple like ragdolls where they stand, and get back up after a second or two. Quite amusing, but still not there yet.

 

I've tried a variety of magnitude values, currently on 500, but it doesn't seem to be making a difference. Instinct tells me here that the magnitude is fine, but that maybe the push has no direction to launch them in.

 

any advice still appreciated

 

in case it's helpful, the source code for the unrelenting force script reads as follows:

 

 

Scriptname VoicePushEffectScript extends ActiveMagicEffect  

Event OnEffectStart(actor Target, actor Caster)
Caster.PushActorAway(Target, PushForce)
EndEvent

int Property PushForce  Auto  

 

since there's no apparent Pushforce variable in there, it could be that it's declared in the super class (ActiveMagicEffect) but i've no idea how it's set since i'm not doing an active spell here.

Link to comment
Share on other sites

omg i got it working yaaaaaay ^___^

 

i found a pushforce parameter to manually set and it seems to have done the trick nicely. I've got it on 10, which is 66% of unrelentingForce III. it's like hitting people with the baseball bat of the gods.

 

will release this at some point :P

Link to comment
Share on other sites

You may want to tweak the script if you're using it on a weapon, or better yet make a custom script. The Knockback effect glitches killmoves, making the target temporarily invincible. Use this one instead, it disables the knockback during killmoves.

 

voicepusheffectScript extends ActiveMagicEffect 

Event OnEffectStart(actor Target, actor Caster)
if target.isinkillmove() == 0
   Caster.PushActorAway(Target, PushForce)
endif
EndEvent


Int Property PushForce  Auto 

Link to comment
Share on other sites

  • 7 years later...

Is there a mod yet for this’ll?

i'd like the mod they speak of as well. or at least that fixed script. i have a sword that i put a knockback enchantment on. i think the enchantment is off of a mod added weapon, anyway, about 25% of the time, a kill move will trigger that invincibility

Link to comment
Share on other sites

  • 1 year later...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...