From 26446b6b339443a8e87ea2a397ae60baab9bb512 Mon Sep 17 00:00:00 2001 From: Cain Kilgore Date: Sat, 17 Jun 2017 00:51:34 +0100 Subject: [PATCH] Debugging info - check what the arrow hit --- unpublishedScripts/marketplace/shortbow/bow/bow.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/unpublishedScripts/marketplace/shortbow/bow/bow.js b/unpublishedScripts/marketplace/shortbow/bow/bow.js index 8a04325bcc..67209845d1 100644 --- a/unpublishedScripts/marketplace/shortbow/bow/bow.js +++ b/unpublishedScripts/marketplace/shortbow/bow/bow.js @@ -387,8 +387,14 @@ function getControllerLocation(controllerHand) { Script.removeEventHandler(arrow, "collisionWithEntity", makeArrowStick); }; + var makeBallGoPoof = function(entityA, entityB, collision) { + print("Entity hit: " + entityB); + Script.removeEventHandler(arrow, "collisionWithEntity", makeBallGoPoof); + }); + Script.addEventHandler(arrow, "collisionWithEntity", makeArrowStick); - + Script.addEventHandler(arrow, "collisionWithEntity", makeBallGoPoof); + return arrow; },