Am I using this correctly? Should I be using larger values?
Also, the default values are not listed on the wiki page for the function, I had to do some guessing for the first 2 arguments for A_FaceTarget.
Code: Select all
Actor XtCorporal : XtMonster replaces ShotgunGuy
{
Radius 20
Height 56
Mass 100
Health 30
PainChance 224
PainChance "Shadow", 256
Speed 4
MinMissileChance 192
MaxTargetRange 1024
Species "Zombie"
SeeSound "zombie/sight"
ActiveSound "zombie/active"
PainSound "zombie/pain"
DeathSound "zombie/death"
DropItem "XtShotgun" 256
DropItem "Xt12Shell" 32, 4
DropItem "XtSMedikit" 8
Obituary "$OB_CORPORAL"
var int user_xraise;
States
{
Spawn:
PLA3 A 1 NoDelay A_LookEx (0, 0, 0, 0, 0, "Chase")
Loop
Chase:
TNT1 A 0 A_SpawnItemEx ("XtZombieStep", 10, 10, 15)
PLA3 AA 2 A_Chase ("", "")
PLA3 AA 2 A_Chase ("", "Missile")
PLA3 BB 2 A_Chase ("", "")
PLA3 BB 2 A_Chase ("", "Missile")
TNT1 A 0 A_SpawnItemEx ("XtZombieStep", 0, 0, 15)
PLA3 CC 2 A_Chase ("", "")
PLA3 CC 2 A_Chase ("", "Missile")
PLA3 DD 2 A_Chase ("", "")
PLA3 DD 2 A_Chase ("", "Missile")
Loop
Missile:
PLA3 E 10 A_FaceTarget (90, 180, FRandom(-24, 24), FRandom(-24, 24), FAF_MIDDLE)
PLA3 E 3 Bright A_FaceTarget (90, 180, FRandom(-24, 24), FRandom(-24, 24), FAF_MIDDLE)
TNT1 A 0 A_PlaySound ("weapons/shotgf", CHAN_WEAPON, 1, 0)
TNT1 A 0 A_ChangeVelocity (Cos(Pitch)*-1, 0, Sin(Pitch)*1, 1)
TNT1 AAAAAAAAA 0 A_CustomMissile ("XtShotgunShooter", 33, 9, FRandom(-4.5, 4.5), CMF_TRACKOWNER|CMF_OFFSETPITCH, FRandom(-4.5, 4.5))
PLA3 F 7 Bright A_FaceTarget (90, 180, FRandom(-24, 24), FRandom(-24, 24), FAF_MIDDLE)
TNT1 A 0 A_ChangeFlag ("NOPAIN", 1)
TNT1 A 0 A_PlaySound ("weapons/shotgr", CHAN_6, 1, 0)
PLA3 AAA 10 A_FaceTarget (90, 180, FRandom(-24, 24), FRandom(-24, 24), FAF_MIDDLE)
PLA3 A 4 A_FaceTarget (90, 180, FRandom(-24, 24), FRandom(-24, 24), FAF_MIDDLE)
TNT1 A 0 A_ChangeFlag ("NOPAIN", 0)
Goto Chase
Pain:
PLA3 G 3
PLA3 G 3 A_Pain
Goto Chase
Death:
PLA3 H 5
PLA3 I 5 A_Scream
PLA3 J 5 A_NoBlocking
PLA3 K 5
TNT1 A 0 A_SpawnItemEx ("XtLightBodyFall", 0, 0, 15)
PLA3 LM 5
PLA3 N -1
Stop
XDeath:
TNT1 A 0 A_SetUserVar ("user_xraise", 1)
PLA3 O 5
PLA3 P 5 A_XScream
PLA3 Q 5 A_NoBlocking
PLA3 RSTUV 5
PLA3 W -1
Stop
Raise:
TNT1 A 0 A_JumpIf (user_xraise == 1, "XRaise")
PLA3 MLKJIH 5
Goto Spawn
XRaise:
TNT1 A 0 A_SetUserVar ("user_xraise", 0)
PLA3 VUTSRQPO 5
Goto Spawn
}
}