
Untitled
By: a guest on
Jul 4th, 2012 | syntax:
None | size: 0.77 KB | hits: 9 | expires: Never
actor Enemy_Healthbar
{
+NOGRAVITY
+NOBLOCKMAP
+ISMONSTER
-COUNTKILL
scale 0.5
States
{
Spawn:
MBAR A 0
MBAR A 0 A_RearrangePointers(AAPTR_MASTER,AAPTR_TARGET)
MBAR A 0 A_JumpIf (ACS_NamedExecuteWithResult("ReturnTargetHealth") <= 50, "B")
MBAR A 0 A_JumpIf (ACS_NamedExecuteWithResult("ReturnTargetHealth") <= 0, "C")
A: //only three states just for testing. this one is full health.
MBAR A 1 bright A_Warp(AAPTR_MASTER,0,0,64,0,WARPF_NOCHECKPOSITION)
goto spawn
B: //half health
MBAR F 1 bright A_Warp(AAPTR_MASTER,0,0,64,0,WARPF_NOCHECKPOSITION)
goto spawn
C: //should be dead
MBAR J 1 bright A_Warp(AAPTR_MASTER,0,0,64,0,WARPF_NOCHECKPOSITION)
stop
//goto spawn
Death:
TNT1 A 0
stop
}
}