Advertisement
Guest User

Untitled

a guest
Jul 3rd, 2015
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. addHook("MobjMoveCollide", function(mo, touched2)
  2. if mo.state == S_NPCJUMP2
  3. or mo.state == S_NPCJUMP4 then
  4. if mo.z > (touched2.z + touched2.height) or touched2.z > (mo.z + mo.height) or touched2.health == 0 or mo.health == 0 or (touched2.flags & MF_ENEMY) then return end
  5. A_ZThrust(mo, 10, (0<<16)+0)
  6. P_KillMobj(touched2)
  7. S_StartSound(touched2, sfx_pop)
  8. end
  9. end, MT_NPC )
  10.  
  11. addHook("MobjMoveCollide", function(mo, touched3)
  12. if mo.state == S_NPCWALK1
  13. or mo.state == S_NPCWALK2
  14. or mo.state == S_NPCWALK3
  15. or mo.state == S_NPCWALK4
  16. or mo.state == S_NPCWALK5
  17. or mo.state == S_NPCWALK6
  18. or mo.state == S_NPCWALK7
  19. or mo.state == S_NPCWALK8 then
  20. if mo.z > (touched3.z + touched3.height) or touched3.z > (mo.z + mo.height) or touched3.health == 0 or mo.health == 0 or (touched3.flags & MF_ENEMY) then return end
  21. P_DamageMobj(mo,1)
  22. end
  23. end, MT_NPC)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement