Actor Func_MeleeScan : CustomInventory //Neural Stunner https://forum.zdoom.org/viewtopic.php?f=37&t=32535#p616143
{
States
{
Pickup:
Scan:
TNT1 A 0 A_SetArg (4, 0)
TNT1 A 0 A_JumpIfCloser (Args[3], "Done")
Scan1:
TNT1 A 0 A_SetArg (4, Args[4] + 1)
TNT1 A 0 A_SetAngle (Angle - Args[4])
TNT1 A 0 A_JumpIfCloser (Args[3], "Done")
TNT1 A 0 A_SetAngle (Angle + Args[4] + Args[4])
TNT1 A 0 A_JumpIfCloser (Args[3], "Done")
TNT1 A 0 A_SetAngle (Angle - Args[4])
TNT1 A 0 A_JumpIf (Args[4] == Args[2], "Done")
Loop
Done:
TNT1 A 0 A_SetArg (4, 0)
TNT1 A 0 A_Jump (256, "DoneHit")
DoneHit:
TNT1 A 0
Stop
Spawn:
TNT1 A 0
Stop
}
}
Actor Func_HammerAttack : Func_MeleeScan
{
States
{
Pickup:
TNT1 A 0 A_SetArg (2, 45) // Attack angle. Total scan arc will be twice this.
TNT1 A 0 A_SetArg (3, 96) // Attack distance.
Goto Scan
DoneHit: // Actual attack goes here. A_FireBullets is strongly suggested.
TNT1 A 0 {A_FireBullets (0,0,1,random(60,90),"hammerpuff",0,96); A_Stop();}
TNT1 A 0 {A_Custompunch(random(0,83), 1, 0, "BURNPuff", 96) ; A_Stop();}
Stop
}
}
Actor Func_StaffAttack : Func_MeleeScan
{
States
{
Pickup:
TNT1 A 0 A_SetArg (2, 45) // Attack angle. Total scan arc will be twice this.
TNT1 A 0 A_SetArg (3, 120) // Attack distance.
Goto Scan
DoneHit: // Actual attack goes here. A_FireBullets is strongly suggested.
TNT1 A 0 A_FireBullets(0,0,1, random(20, 35), "staffpuff", 0, 120)
Stop
}
}
Users browsing this forum: No registered users and 1 guest