Chaosforge Forum
DoomRL => Modding => Topic started by: Rabinowitz on March 30, 2012, 03:41
-
When trying to create melee weapon with alternatiwe whirlwind fire i get error message:
Error message : modules\crazydoom.module\crazy_items.lua:14: attempt to read undeclared variable ALT_WHIRLWIND
Overriding altfire for existing items like 'items.knife.altfire = ALT_WHIRLWIND' causes the same error.
Overriding like 'items.knife.altfire = items.udragon.altfire' doesnt cause error, but has no real effect at all.
What did i miss then?
-
ALT_WHIRLWIND apparently doesn't exist.
items.udragon.altfire is bound to the value 3, which is ALT_SCRIPT. To get whirlwind's effect, you'd also have to copy the OnAltFire function.
items.youritemidhere.altfire = ALT_SCRIPT
items.youritemidhere.OnAltFire = items.udragon.OnAltFire
Try this and see if it works.
-
Yes, it works with OnAltFire well.