I've made this incredible discovery today. I figured it could in handy to someone else...
Sure, you can do this:
Code: Select all
MAGE F 0 A_CustomMissile ("LightningCeiling", 48, 0, 0, CMF_TRACKOWNER, 0)
MAGE F 6 A_CustomMissile ("LightningFloor", 48, 0, 0, CMF_TRACKOWNER, 0)
The only codepointer that can pass the needed information is native to [wiki=Classes:MWeapLightning]MWeapLightning[/wiki]. 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 all
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
}
}
Code: Select all
MAGE F 6 A_CustomMissile ("ShotLightning", 48, 0, 0, CMF_TRACKOWNER, 0)
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!