Page 1 of 1

NS's Decorate Resource: Using Arc of Death from a Monster

PostPosted: Thu Mar 18, 2010 4:56 pm
by NeuralStunner
Using Arc of Death from a Monster:
I've made this incredible discovery today. I figured it could in handy to someone else...

Sure, you can do this:
Code: Select allExpand view
      MAGE F 0 A_CustomMissile ("LightningCeiling", 48, 0, 0, CMF_TRACKOWNER, 0)
      MAGE F 6 A_CustomMissile ("LightningFloor", 48, 0, 0, CMF_TRACKOWNER, 0)

But it just doesn't work quite right - the arc tends to pass right through enemies, and the two parts don't work together like they should. So how do you make it work?

The only codepointer that can pass the needed information is native to MWeapLightning. But that's a hint: It doesn't necessarily have to be used from a weapon's Fire state. Let's inherit from that and make a new actor... but we add a twist:
Code: Select allExpand view
Actor ShotLightning : MWeapLightning
{
   +WEAPON.CHEATNOTWEAPON
   +WEAPON.NO_AUTO_SWITCH
   Weapon.AmmoGive 0
   Projectile
   Speed 32
   States
   {
   Spawn:
   Death:
      TNT1 A 0
      TNT1 A 1 A_MLightningAttack
      Stop
   }
}

That's right, it's a projectile. Now, to use the attack you simply add this wherever the monster would attack:
Code: Select allExpand view
      MAGE F 6 A_CustomMissile ("ShotLightning", 48, 0, 0, CMF_TRACKOWNER, 0)

Now as soon as the weapon/missile is fired, it fires a properly linked lightning pillar. Zap! Just don't get in the way. :twisted:

Note that this trick does not work with Frost Shards, about the only other weapon you'd want this trick for. That, however, could be simulated if you know all the angles/offsets for the fired FrostMissiles. (Incidentally, if anyone knows those, I would greatly appreciate having that info as well. =:) )

I may have some other tidbits later on. Enjoy!

Re: NS's Decorate Resource: Using Arc of Death from a Monste

PostPosted: Fri Mar 19, 2010 7:23 am
by Gez
NeuralStunner wrote:(Incidentally, if anyone knows those, I would greatly appreciate having that info as well. =:) )


It'll be in the wiki eventually. But before documenting them, I'll finish the last missing Heretic codepointers. Then it'll be Hexen's turn; and finally Strife's.