Well, I'm having a hard time trying this out... the SXF_TRANSFERPOINTERS flag in A_SpawnItemEx.
I'm trying to make something for my Quake 2 BFG10K that acts like the original, but I'm not getting what am I doing wrong

I'll explain how it works:
The BFG10K shot every 2 tics spawns a friendly monster, which faces the opponents and fires, and then disappears... but instead of the firing player getting a frag, the dying player gets a frag substracted. It wasn't big deal till yesterday, when I got tired of that xD
I'm using SXF_TRANSFERPOINTERS to pass the target, the master and the tracers from the BFG ball to the "BFG blaster" (monster which actually fires).
Also I included an obituary for the BFG blaster, but if the foe dies by its shot, it just displays "[foe] died."
Here are the DECORATEs for all the stuff:
Code: Select all
ACTOR BFGShot : BFGBall // I will omit all the obvious particle spawning stuff...
{
Decal BFGScorch
Decal BFGLightning
Speed 15
Damage (200)
+FORCERADIUSDMG
+RANDOMIZE
RenderStyle Add
Alpha 0.37
DeathSound "bfg10k/die"
Obituary "%o was deintegrated by %k's BFG10k."
States
{
Spawn:
B10K A 1 Bright A_SpawnItemEx("BFGblaster",0,0,0,0,0,0,0,SXF_SETMASTER|SXF_TRANSFERPOINTERS)
B10K A 1 Bright A_PlaySoundEx("bfg10k/fly",SoundSlot7,1)
B10K A 2 Bright A_SpawnItemEx("BFGblaster",0,0,0,0,0,0,0,SXF_SETMASTER|SXF_TRANSFERPOINTERS)
B10K B 2 Bright A_SpawnItemEx("BFGblaster",0,0,0,0,0,0,0,SXF_SETMASTER|SXF_TRANSFERPOINTERS)
B10K B 2 Bright A_SpawnItemEx("BFGblaster",0,0,0,0,0,0,0,SXF_SETMASTER|SXF_TRANSFERPOINTERS)
Loop
Death:
B10K C 0 A_Explode(70,128,1)
B10K C 3 Bright A_Explode(70,128,0) // Double explosion, for the user taking just half damage
B10K D 3 Bright A_BFGSpray
B10K EFGH 3 Bright
Stop
}
}
ACTOR BFGblaster
{
+FRIENDLY
Monster
-COUNTKILL
Radius 1
Height 1
Obituary "%o just couldn't run away from %k's BFG."
Speed 0
MaxTargetRange 256
+NOGRAVITY
+LOOKALLAROUND
MinMissileChance 1
+MISSILEMORE
+MISSILEEVENMORE
RenderStyle Translucent
Alpha 0.2 // To make them disappear if they don't attack
+NOCLIP
+QUICKTORETALIATE
+NOBLOCKMAP
States
{
Spawn:
TNT1 A 1 A_Look
TNT1 A 0 A_FadeOut(0.1)
Loop
See:
TNT1 A 1 A_Chase
TNT1 A 0 A_FadeOut(0.1)
Loop
Missile:
TNT1 A 0 A_FaceTarget
TNT1 A 1 A_CustomMissile("BFGBeam")
Goto Death
Death:
TNT1 A 0
Stop
}
}
ACTOR BFGBeam
{
Radius 8
Height 8
Speed 50
Damage (2*(random(1,6)))
Projectile
RenderStyle Add
-ACTIVATEPCROSS
Obituary "%o just couldn't run away from %k's BFG."
+BLOODSPLATTER
+RANDOMIZE
Alpha 0.35
States
{
Spawn:
APLS AB 3 Bright Light ("ARACHPLAS")
Loop
Death:
TNT1 A 1
Stop
}
}