Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 4th, 2012  |  syntax: None  |  size: 0.77 KB  |  hits: 9  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. actor Enemy_Healthbar
  2. {
  3.         +NOGRAVITY
  4.         +NOBLOCKMAP
  5.         +ISMONSTER
  6.         -COUNTKILL
  7.         scale 0.5
  8.         States
  9.         {
  10.                 Spawn:
  11.                         MBAR A 0
  12.                         MBAR A 0 A_RearrangePointers(AAPTR_MASTER,AAPTR_TARGET)
  13.                         MBAR A 0 A_JumpIf (ACS_NamedExecuteWithResult("ReturnTargetHealth") <= 50, "B")
  14.                         MBAR A 0 A_JumpIf (ACS_NamedExecuteWithResult("ReturnTargetHealth") <= 0, "C")
  15.                         A: //only three states just for testing. this one is full health.
  16.                                 MBAR A 1 bright A_Warp(AAPTR_MASTER,0,0,64,0,WARPF_NOCHECKPOSITION)
  17.                                 goto spawn
  18.                         B: //half health
  19.                                 MBAR F 1 bright A_Warp(AAPTR_MASTER,0,0,64,0,WARPF_NOCHECKPOSITION)
  20.                                 goto spawn                     
  21.                         C: //should be dead
  22.                                 MBAR J 1 bright A_Warp(AAPTR_MASTER,0,0,64,0,WARPF_NOCHECKPOSITION)
  23.                                 stop
  24.                                 //goto spawn
  25.                 Death:
  26.                         TNT1 A 0
  27.                         stop
  28.         }
  29. }