Skip to content

Instantly share code, notes, and snippets.

@domgetter
Created December 21, 2013 00:15
Show Gist options
  • Save domgetter/8063648 to your computer and use it in GitHub Desktop.
Save domgetter/8063648 to your computer and use it in GitHub Desktop.
-- inside damage()
status, err = pcall(function ()
for k,v in pairs(entity.velocity()) do
print("velocity: ",k, v)
end
end)
print(status)
print(err)
output to console after 4 hits.
velocity: 1 -9.5567903518677
velocity: 2 -7.614100933075
true
nil
velocity: 1 -0.0021059280261397
velocity: 2 12.706013679504
true
nil
velocity: 1 -12.638889312744
velocity: 2 -1.2962963581085
true
nil
velocity: 1 -12.638889312744
velocity: 2 -1.2962963581085
true
nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment