dudeapocalypse Posted March 15, 2020 Share Posted March 15, 2020 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 InsertIf Player.GetAnimAction 8 == 0 into it somehow, but I have no idea how to do it correctly. Here's my current script: scn PB40mmKnockdownScriptref myselfBegin ScriptEffectStartIf myself.HasPerk Stonewall != 1 set myself to GetSelf player.pushactoraway myself 3Else ShowMessage StonewallMessageEndIfEnd Link to comment Share on other sites More sharing options...
madmongo Posted March 15, 2020 Share Posted March 15, 2020 (edited) You mean something like this? scn PB40mmKnockdownScriptref myselfBegin ScriptEffectStart set myself to GetSelf ; make sure you set variables BEFORE using them or bad things happenIf myself.HasPerk Stonewall != 1 If Player.GetAnimAction == 8 player.pushactoraway myself 3 Else ShowMessage StonewallMessage ; do you want a message here? EndifElse ShowMessage StonewallMessageEndIfEnd 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 March 16, 2020 by madmongo Link to comment Share on other sites More sharing options...
dudeapocalypse Posted March 16, 2020 Author Share Posted March 16, 2020 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 happenIf myself.HasPerk Stonewall != 1 If Player.GetAnimAction == 8 player.pushactoraway myself 3 Else ShowMessage StonewallMessage ; do you want a message here? EndifElse ShowMessage StonewallMessageEndIf 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=GetAnimActionHmm, 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 More sharing options...
dudeapocalypse Posted June 9, 2020 Author Share Posted June 9, 2020 In case someone is interested, this is how i resolved it: i didn't change the vanilla script, except the pushactoraway distance, which was 12 in the original. lnstead i excluded the effect from applying if you are aiming at own feet: Link to comment Share on other sites More sharing options...
Recommended Posts