Advertisement
Guest User

Untitled

a guest
Oct 18th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. Class ZBelphegor : BaronofHell
  2. {
  3. override void Tick()
  4. {
  5. double floorHeight; // This gets the height of the floor directly in front of the monster
  6. vector3 oldPos = pos; // This stores the monsters current position
  7. {
  8. A_Warp(AAPTR_Master,0,0,0,0,WARPF_TESTONLY); // Account for thin 3D floors
  9. floorHeight = oldPos.z - GetZAt(0,0); // Calculate the floor height directly in front of the monster
  10. }
  11. if(InStateSequence(CurState,ResolveState("STAMPEDE"))) // Only Jump if the monster is charging
  12. {
  13. if(floorHeight < (oldPos.z - MaxDropOffHeight)) // Is the drop off in front of us worth the jump
  14. {
  15. SetStateLabel("BackUpNow"); // No we can't! ABORT ABORT!
  16. }
  17. }
  18. return Super.Tick();
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement