Jump to content

Need some help with a knockdown script


dudeapocalypse

Recommended Posts

I made a non lethal 40mm grenade ammo which knocks targets down. The problem is, if player fires at his feet with a last round of a grenade launcher or with a single shot grenade rifle, he gets knocked before he has time to reload and it causes some doubtful shenanigans where weapon is dropped, then re-added when player gets up, weapon could be not visible in 3rd person after that, in short, not a game-breaking stuff, but looks doubtful. So I want a script for the knockdown effect that would exclude player from a knockdown if he's reloading.

 

What I use now is edited bighorner knockdown script, and according to the GECK tutorial I need to Insert

If Player.GetAnimAction 8 == 0 into it somehow, but I have no idea how to do it correctly. Here's my current script:

 

scn PB40mmKnockdownScript

ref myself

Begin ScriptEffectStart

If myself.HasPerk Stonewall != 1
set myself to GetSelf
player.pushactoraway myself 3
Else
ShowMessage StonewallMessage
EndIf

End

Link to comment
Share on other sites

You mean something like this?

 

 

scn PB40mmKnockdownScript

ref myself

Begin ScriptEffectStart

 

set myself to GetSelf ; make sure you set variables BEFORE using them or bad things happen
If myself.HasPerk Stonewall != 1
If Player.GetAnimAction == 8
player.pushactoraway myself 3

Else

ShowMessage StonewallMessage ; do you want a message here?

Endif
Else
ShowMessage StonewallMessage
EndIf

End

 

By the way, the discussion page for the GECK on Bethesda says that GetAnimAction doesn't return the values listed. You might need to use 9 instead of 8. I haven't tried it myself so I don't know which is correct. See the discussion tab here:

http://geck.bethsoft.com/index.php?title=GetAnimAction

Edited by madmongo
Link to comment
Share on other sites

You mean something like this?

 

 

scn PB40mmKnockdownScript

 

ref myself

 

Begin ScriptEffectStart

 

set myself to GetSelf ; make sure you set variables BEFORE using them or bad things happen

If myself.HasPerk Stonewall != 1

If Player.GetAnimAction == 8

player.pushactoraway myself 3

Else

ShowMessage StonewallMessage ; do you want a message here?

Endif

Else

ShowMessage StonewallMessage

EndIf

 

End

 

By the way, the discussion page for the GECK on Bethesda says that GetAnimAction doesn't return the values listed. You might need to use 9 instead of 8. I haven't tried it myself so I don't know which is correct. See the discussion tab here:

http://geck.bethsoft.com/index.php?title=GetAnimAction

Hmm, now it doesn't knock anyone at all. I tried both GetAnimAction 8 and 9. It knocks everyone without " If Player.GetAnimAction == " line like before, but the "Stonewall blocked a knockdown attempt" message appears every time.

Link to comment
Share on other sites

  • 2 months later...
  • Recently Browsing   0 members

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