Odd request, but is there a way to set the handGrip on a boomerang to wrap? Setting it in the activeitem file did nothing.
Hey there, I've looked into the handGrip part and found something. (As you already made this post, I'll write it here.) Make a copy of "boomerang.lua" and rename it, then in the update you add the following line. Code: activeItem.setOutsideOfHand(true) Then in your weapon change "scripts" : ["boomerang.lua"] to your new script.
Within the update code block If nothing changed, make sure you actually change the LUA file reference inside the .activeitem Attached is the "mod" that contains my changed files.
ok, so that DOES work. however, that sets it to only outside of the hand. when handGrip is set to wrap, the weapon is to always be covering the hand. after applying the corrected code myself, the weapon's arm wouldnt move or shoot
Try using this instead. (just replace the other "activeItem.setOutsideOfHand(true)" line Code: activeItem.setOutsideOfHand( ((activeItem.hand() == "primary" and -1 or 1) == mcontroller.facingDirection())) Here an explanation of what each component does and the logic behind it: activeItem.hand() returns "primary" if in left slot and "alt" if in right slot. (Two handed weapons always return "primary" but that is not important for us now) mcontroller.facingDirection() returns 1 when player is facing right and -1 if player is facing left When facing right, the "primary" hand is in the back. When facing left, the "primary" hand is in the front. (Inverted for "alt" hand slot) activeItem.setOutsideOfHand(true) -> render outside activeItem.setOutsideOfHand(false) -> render inside When facing "right" and the hand is "primary" the weapon should be rendered inside -> facingdirection = 1, primary = -1 -> 1 =/= -1 -> false When facing "left" and the hand is "primary" the weapon should be rendered outside -> facingdirection = -1, primary = -1 -> -1 == -1 -> true In case this happens to do the opposite, just switch around the -1/1 in the code line. As for your weapon not rotation/firing, that always happens when there is an error within LUA. (In short, your weapon script crashed) Edit: removed mistake from the code line
my friend, you have done it again. finally have an arm cannon with a properly returning boomerang projectile. greatly appreciated!