Chaosforge Forum

  • December 13, 2018, 19:47
  • Welcome, Guest
Please login or register.



Login with username, password and session length
Pages: [1]

Author Topic: ALT_WHIRLWIND - doesnt work.  (Read 1102 times)

Rabinowitz

  • DiabloRL Beta Tester
  • Lance Corporal
  • *
  • Offline Offline
  • Posts: 32
    • View Profile
ALT_WHIRLWIND - doesnt work.
« 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?
Logged
Yellow Man has non-zero weight.

shark20061

  • Programmer
  • Elder Chaos Guard
  • Captain
  • *
  • *
  • Offline Offline
  • Posts: 266
    • View Profile
Re: ALT_WHIRLWIND - doesnt work.
« Reply #1 on: March 30, 2012, 04:18 »

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.

Code: [Select]
items.youritemidhere.altfire = ALT_SCRIPT
items.youritemidhere.OnAltFire = items.udragon.OnAltFire

Try this and see if it works.
Logged
Hell Knight Warrant Officer (0.9.9.4)  [26!/8/3/1/0]

Mancubus 2nd Lieutenant (0.9.9.6)  [22/12/3/0/0]
M:16 S:43 (126) A:17

Rabinowitz

  • DiabloRL Beta Tester
  • Lance Corporal
  • *
  • Offline Offline
  • Posts: 32
    • View Profile
Re: ALT_WHIRLWIND - doesnt work.
« Reply #2 on: March 30, 2012, 05:13 »

Yes, it works with OnAltFire well.
Logged
Yellow Man has non-zero weight.
Pages: [1]