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

Sprites, textures, sounds, code, and other resources belong here. Share and share-alike!
Forum rules
Before posting your Resource, please make sure you can answer YES to any of the following questions:
  • Is the resource ENTIRELY my own work?
  • If no to the previous one, do I have permission from the original author?
  • If no to the previous one, did I put a reasonable amount of work into the resource myself, such that the changes are noticeably different from the source that I could take credit for them?
If you answered no to all three, maybe you should consider taking your stuff somewhere other than the Resources forum.

Consult the Resource/Request Posting Guidelines for more information.

Please don't put requests here! They have their own forum --> here. Thank you!

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

Postby NeuralStunner » Thu Mar 18, 2010 5:56 pm

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!
User avatar
NeuralStunner
An Exercise in Self-Indulgence
 
 
 
Joined: 21 Jul 2009
Location: Indiana, USA
Discord: NeuralStunner#1293
Operating System: Windows Vista/7 64-bit

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

Postby Gez » Fri Mar 19, 2010 8:23 am

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.
Gez
 
 
 
Joined: 06 Jul 2007


Return to Resources

Who is online

Users browsing this forum: GAA1992, mail.ru [Bot] and 2 guests