AndrewofDoom

Collision problem

Aug 27th, 2013
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. $On Ship Collision:
  2. [
  3. if hv.Player:isValid() then
  4. str_nameofship = tostring(hv.Ship)
  5. str_nameofself = tostring(hv.Self)
  6. str_nameofobject = tostring(hv.Object)
  7. str_objectbreed = hv.Object:getBreedName()
  8. str_shipbreed = hv.Ship:getBreedName()
  9. if (hv.Object == hv.Player and str_shipbreed == "Ship") or ( str_objectbreed == "Ship" and hv.Ship == hv.Player) then
  10. hv.Player:kill(hv.Ship)
  11. end
  12. end
  13. ]
Advertisement
Add Comment
Please, Sign In to add comment