Jump to content

Why isn't this script working?


KiCHo666

Recommended Posts

Hello!

darthbdaman made a script for me that removes kill impulse from all weapons. I modified the script so that unarmed/melee have random kill impulse with 2 handed melee having the highest kill impulse.
This produced a problem where Power Fist has very weak kill impusle since it's Unarmed weapon, so I tried to use GetWeaponAttackAnimation to detect if weapon uses Attack5. (Power fist and its variants use Attack5)

Here's part of the code that bugs me:

 

 

scn KillImpulseNullScript
array_var Entry
ref rWeap
float fRandNum
begin GameMode
if GetGameRestarted
foreach Entry <- (GetLoadedTypeArray 40)
let rWeap := *Entry
if (GetWeaponType rWeap == 0) && (rWeap.GetWeaponAttackAnimation != 3) <---------- This line should get all weapons that are of type Unarmed and are NOT using Attack5 animation.
let fRandNum := Rand 5, 10
SetWeaponKillImpulse rWeap fRandNum
elseif (GetWeaponType rWeap == 0) && (rWeap.GetWeaponAttackAnimation == 3) <---------- Same as previous, but only get Unarmed weapons that use Attack5 animation
let fRandNum := Rand 30, 50
SetWeaponKillImpulse rWeap fRandNum


But this doesn't work in game. Kills made with Powerfist still use weak 5 to 10 kill impulse value.

Help would be appreciated.

 

Edited by KiCHo666
Link to comment
Share on other sites

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

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