
//TestHelpers seperated so the actors below can be used on all the classes

actor Test_HitboxBase
{
+CLIENTSIDEONLY
+NOINTERACTION
+NOGRAVITY
-SOLID
radius 2
height 2
scale 2.5
}

actor Test_HitboxFX : Test_HitboxBase
{
states
{
Spawn:
HDOK N 0
HDOK N 1
stop
}
}

actor Test_HitboxFX_H : Test_HitboxBase//Old
{
Meleerange 64
Accuracy 64
Mass 64

reactiontime 5
Scale 2.5
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SetArg(2,-Accuracy)
Spawn2:
TNT1 A 0 A_SpawnItemEx("Test_HitboxFX",Meleerange,Args[2],Mass*1.00,0,0,0,(ReactionTime-1)*90,4+16384)
TNT1 A 0 A_SpawnItemEx("Test_HitboxFX",Meleerange,Args[2],Mass*0.75,0,0,0,(ReactionTime-1)*90,4+16384)
TNT1 A 0 A_SpawnItemEx("Test_HitboxFX",Meleerange,Args[2],Mass*0.50,0,0,0,(ReactionTime-1)*90,4+16384)
TNT1 A 0 A_SpawnItemEx("Test_HitboxFX",Meleerange,Args[2],Mass*0.25,0,0,0,(ReactionTime-1)*90,4+16384)
TNT1 A 0 A_SpawnItemEx("Test_HitboxFX",Meleerange,Args[2],Mass*0.00,0,0,0,(ReactionTime-1)*90,4+16384)
TNT1 A 0 A_SetArg(2,Args[2]+Accuracy*0.25)
TNT1 A 0 A_JumpIf(Args[2]<Accuracy,"Spawn2")
TNT1 A 0 A_Countdown
goto Spawn
Death:
HDOK N 1
stop
}
}

actor Test_BasicHitBox : Test_HitboxBase
{
var int user_Div;

Radius 88
Height 88

reactiontime 10

Scale 1.0
//Args 1
States
{
Spawn:
TNT1 A 0
TNT1 A 0 A_SetArg(4,reactiontime)
TNT1 A 0 A_SetUserVar("user_Div",reactiontime)

SpawnArg:
TNT1 A 0

TNT1 A 0 A_SpawnItemEx("Test_BasicHitBoxFX1",Radius-(Radius/user_Div*Args[4])*2,Radius,Height,0,0,0,0,35+16384)
TNT1 A 0 A_SpawnItemEx("Test_BasicHitBoxFX1",Radius-(Radius/user_Div*Args[4])*2,-Radius,Height,0,0,0,0,35+16384)
TNT1 A 0 A_SpawnItemEx("Test_BasicHitBoxFX1",Radius,Radius-(Radius/user_Div*Args[4])*2,Height,0,0,0,0,35+16384)
TNT1 A 0 A_SpawnItemEx("Test_BasicHitBoxFX1",-Radius,Radius-(Radius/user_Div*Args[4])*2,Height,0,0,0,0,35+16384)

TNT1 A 0 A_SpawnItemEx("Test_BasicHitBoxFX1",Radius-(Radius/user_Div*Args[4])*2,Radius,0,0,0,0,0,35+16384)
TNT1 A 0 A_SpawnItemEx("Test_BasicHitBoxFX1",Radius-(Radius/user_Div*Args[4])*2,-Radius,0,0,0,0,0,35+16384)
TNT1 A 0 A_SpawnItemEx("Test_BasicHitBoxFX1",Radius,Radius-(Radius/user_Div*Args[4])*2,0,0,0,0,0,35+16384)
TNT1 A 0 A_SpawnItemEx("Test_BasicHitBoxFX1",-Radius,Radius-(Radius/user_Div*Args[4])*2,0,0,0,0,0,35+16384)

TNT1 A 0 A_CountdownArg(4,"SpawnLStart")
loop
SpawnLStart:
TNT1 A 0
SpawnL:
TNT1 A 0 A_SpawnItemEx("Test_BasicHitBoxFX1",Radius,Radius,Height-(Height/user_Div*ReactionTime),0,0,0,0,35+16384)
TNT1 A 0 A_SpawnItemEx("Test_BasicHitBoxFX1",Radius,-Radius,Height-(Height/user_Div*ReactionTime),0,0,0,0,35+16384)
TNT1 A 0 A_SpawnItemEx("Test_BasicHitBoxFX1",-Radius,Radius,Height-(Height/user_Div*ReactionTime),0,0,0,0,35+16384)
TNT1 A 0 A_SpawnItemEx("Test_BasicHitBoxFX1",-Radius,-Radius,Height-(Height/user_Div*ReactionTime),0,0,0,0,35+16384)
TNT1 A 0
TNT1 A 0 A_Countdown
loop
Death:
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("Test_BasicHitBoxFX0",Radius,Radius,Height,0,0,0,0,35+16384)
TNT1 A 0 A_SpawnItemEx("Test_BasicHitBoxFX0",Radius,-Radius,Height,0,0,0,0,35+16384)
TNT1 A 0 A_SpawnItemEx("Test_BasicHitBoxFX0",Radius,Radius,0,0,0,0,0,35+16384)
TNT1 A 0 A_SpawnItemEx("Test_BasicHitBoxFX0",Radius,-Radius,0,0,0,0,0,35+16384)
TNT1 A 0 A_SpawnItemEx("Test_BasicHitBoxFX0",-Radius,Radius,Height,0,0,0,0,35+16384)
TNT1 A 0 A_SpawnItemEx("Test_BasicHitBoxFX0",-Radius,-Radius,Height,0,0,0,0,35+16384)
TNT1 A 0 A_SpawnItemEx("Test_BasicHitBoxFX0",-Radius,Radius,0,0,0,0,0,35+16384)
TNT1 A 0 A_SpawnItemEx("Test_BasicHitBoxFX0",-Radius,-Radius,0,0,0,0,0,35+16384)
TNT1 A 0
TNT1 A 0 A_SpawnItemEx("Test_BasicHitBoxFX2",0,0,Height,0,0,0,0,35+16384)
TNT1 A 0 A_SpawnItemEx("Test_BasicHitBoxFX2",0,0,0,0,0,0,0,35+16384)
TNT1 A 0 A_SpawnItemEx("Test_BasicHitBoxFX2",Radius,0,Height/2,0,0,0,0,35+16384)
TNT1 A 0 A_SpawnItemEx("Test_BasicHitBoxFX2",-Radius,0,Height/2,0,0,0,0,35+16384)
TNT1 A 0 A_SpawnItemEx("Test_BasicHitBoxFX2",0,Radius,Height/2,0,0,0,0,35+16384)
TNT1 A 0 A_SpawnItemEx("Test_BasicHitBoxFX2",0,-Radius,Height/2,0,0,0,0,35+16384)
stop
}
}
actor Test_BasicHitBoxFX0 : Test_HitboxBase
{//White
States
{
Spawn:
XMFX D 0
XMFX D 1
stop
}
}
actor Test_BasicHitBoxFX1 : Test_BasicHitBoxFX0
{//Blue
States
{
Spawn:
TMFX E 0
TMFX E 1
stop
}
}
actor Test_BasicHitBoxFX2 : Test_BasicHitBoxFX0
{//Cyan
States
{
Spawn:
TMFX D 0
TMFX D 1
stop
}
}


