Hey, it's me again (I left a long winded post on the last page). I have an update: After further testing, I finally managed to get the gold block teleportation to work. Problem is though, it ONLY worked when you tap the gold ingot on block directly above you. It's cool that I got it working, but the circumstances it takes to get it working is very inconvenient.
Whew! Thank you very much! It was supposed to only trigger on top of a block, (so as not to destroy something in the process of placing the gold block) but this was one of the main things I needed tested: which values correspond to the sides of the block! Let me make an adjustment, then would you try it out again? (This time, on top of the block. )
I did use the .js file. I don't think you know what I mean. It's not giving me trouble, all I'm saying is that it only knocks them in 1 direction.
No, I do understand. When I tested it, it worked just as described. The trouble likely lies in the way that the android operating system processes "Math.sin()" and "Math.cos()".
Rollback Post to RevisionRollBack
"There is no greater good than Justice; and only if law serves Justice is it a good law."
I doubt the knockback works at all. The getPitch function is looking up/down, and ranges from -90 to 90. The getYaw function is looking left/right, and has infinite values.
You used getPitch for the knockback, so the only things that affect the direction of the knockback are looking up and down...
Incorrect. Yes, in the real world, pitch is vertical rotation and yaw is horizontal rotation. However, due to a fault with either treebl's code or the MCPE code itself, their names/functions are reversed. If you don't believe me, add:
to the modTick function. Trust me, I've tested it. It works. Or (easier) try out my original unreleased version, script 4403. (Uses diamond sword.) And I've had no complaints from other users, so again I say it's a problem with his device.
Incorrect. Yes, in the real world, pitch is vertical rotation and yaw is horizontal rotation. However, due to a fault with either treebl's code or the MCPE code itself, their names/functions are reversed. If you don't believe me, add:
to the modTick function. Trust me, I've tested it. It works. Or (easier) try out my original unreleased version, script 4403. (Uses diamond sword.) And I've had no complaints from other users, so again I say it's a problem with his device.
Nothing wrong with my device. What Connor said is true. I use getYaw(); in my knockback sword and some if statements to limit the angle to 0 - 360 degrees, because as he said it has infinite values.
Nothing wrong with my device. What Connor said is true. I use getYaw(); in my knockback sword and some if statements to limit the angle to 0 - 360 degrees, because as he said it has infinite values.
Well, then maybe it's an iOS thing, but my code worked with getPitch(). It's entirely unnecessary to limit the values. The sin() and cos() functions only return values between -1 and 1. sin(20)=sin(20+360)=sin(20+360+360)... etc.
Rollback Post to RevisionRollBack
"There is no greater good than Justice; and only if law serves Justice is it a good law."
Whew! Thank you very much! It was supposed to only trigger on top of a block, (so as not to destroy something in the process of placing the gold block) but this was one of the main things I needed tested: which values correspond to the sides of the block! Let me make an adjustment, then would you try it out again? (This time, on top of the block. )
I tested it again, it now works perfectly! I'm glad I could help in getting that sorted out. It's very convenient being able to teleport back to your "base" when you've strayed too far.
Overall, I'm loving this mod, but I do think they should require some sort of fuel to make it "fair". The only thing that's not horribly overpowered is surprisingly the sword, because it degrades and still takes about four hits to kill a zombie.
I tested it again, it now works perfectly! I'm glad I could help in getting that sorted out. It's very convenient being able to teleport back to your "base" when you've strayed too far.
Overall, I'm loving this mod, but I do think they should require some sort of fuel to make it "fair". The only thing that's not horribly overpowered is surprisingly the sword, because it degrades and still takes about four hits to kill a zombie.
Woot! It does hit mobs in the direction you're facing though, right?
And yeah, once treebl adds functions to affect durability, I'll definitely make it more balanced. In the mean time though, I'll work on the upgrade system to make it a little bit harder to get. Maybe eventually I'll even add special crafting recipes for the teleported pieces.
Rollback Post to RevisionRollBack
"There is no greater good than Justice; and only if law serves Justice is it a good law."
Incorrect. Yes, in the real world, pitch is vertical rotation and yaw is horizontal rotation. However, due to a fault with either treebl's code or the MCPE code itself, their names/functions are reversed. If you don't believe me, add:
to the modTick function. Trust me, I've tested it. It works. Or (easier) try out my original unreleased version, script 4403. (Uses diamond sword.) And I've had no complaints from other users, so again I say it's a problem with his device.
Nothing wrong with my device. What Connor said is true. I use getYaw(); in my knockback sword and some if statements to limit the angle to 0 - 360 degrees, because as he said it has infinite values.
Clearly iOS ModPE Script has a bug, for on Android, this script:
Whew! Thank you very much! It was supposed to only trigger on top of a block, (so as not to destroy something in the process of placing the gold block) but this was one of the main things I needed tested: which values correspond to the sides of the block! Let me make an adjustment, then would you try it out again? (This time, on top of the block.
No, I do understand. When I tested it, it worked just as described. The trouble likely lies in the way that the android operating system processes "Math.sin()" and "Math.cos()".
"There is no greater good than Justice; and only if law serves Justice is it a good law."
Incorrect. Yes, in the real world, pitch is vertical rotation and yaw is horizontal rotation. However, due to a fault with either treebl's code or the MCPE code itself, their names/functions are reversed. If you don't believe me, add:
clientMessage("Yaw: "+getYaw()); clientMessage("Pitch: "+getPitch());to the modTick function. Trust me, I've tested it. It works. Or (easier) try out my original unreleased version, script 4403. (Uses diamond sword.) And I've had no complaints from other users, so again I say it's a problem with his device.
"There is no greater good than Justice; and only if law serves Justice is it a good law."
Well, then maybe it's an iOS thing, but my code worked with getPitch(). It's entirely unnecessary to limit the values. The sin() and cos() functions only return values between -1 and 1. sin(20)=sin(20+360)=sin(20+360+360)... etc.
"There is no greater good than Justice; and only if law serves Justice is it a good law."
I tested it again, it now works perfectly! I'm glad I could help in getting that sorted out. It's very convenient being able to teleport back to your "base" when you've strayed too far.
Overall, I'm loving this mod, but I do think they should require some sort of fuel to make it "fair". The only thing that's not horribly overpowered is surprisingly the sword, because it degrades and still takes about four hits to kill a zombie.
Woot! It does hit mobs in the direction you're facing though, right?
And yeah, once treebl adds functions to affect durability, I'll definitely make it more balanced.
"There is no greater good than Justice; and only if law serves Justice is it a good law."
"There is no greater good than Justice; and only if law serves Justice is it a good law."
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumClearly iOS ModPE Script has a bug, for on Android, this script:
function modTick() { clientMessage("Yaw: " + Math.floor(getYaw()) + " Pitch: " + Math.floor(getPitch())); }has the yaw part changing when I rotate left and right, and pitch part changing when I look up and down.