What is the correct formula for calculating the position to throw a shochthrow? please help me
please give me the formula
Use this:
for time in range(60):
shockThrowTime = time/10
#The rest of the code#
Is it like this?TargetX=hero.opponent.speeddis/15
TargetY=hero.opponent.speeddis/15
This is if you are moving right, but here.
TargetX = enemy.x + (enemy.speed*shockThrowtime)
TargetY = enemy.y
What are they used for?
@Johnathonaldridge I just need the formula to calculate the shochthrow position accurately. can you give me
Use this.
dis = ((TargetX-hero.x)** 2 +(TargetY-hero.y)** 2)** 0.5
if ((shockThrowtime - dis/15)**2)**0.5 <= 0.5:
hero.ability('shockThrow', TargetX, TargetY)
no. Throw position is targetx ,y
Does anyone have an easier way? It’s too confusing
Do you hate doing maths?
very hate I am 12(((
It’s easy look… you have a computer to do all the hard math for you. Run this simple thing on w3…
mySimpleCalc = .1+.2
howDifficultIsThis = (mySimpleCalc == 0.3)
print(howDifficultIsThis)
Or for you js guys… what could go wrong?
<!DOCTYPE html>
<html>
<body>
<h1>JavascriptJustAsBad</h1>
<p id="demo"></p>
<script>
const myResult = .1+.2;
const whatCouldGoWrong = (.3 == myResult);
document.getElementById("demo").innerHTML =
"Da heck is this → " + whatCouldGoWrong;
</script>
</body>
</html>
You sure about that? Looks like a pretty easy math calculation that did NOT go fine…
It is a shockthrow,but the way like this need to write very long,so I am not going to do like this
crab.speed
returns undefined
.
and I found out of position.
This should be fixed, thanks for the report!
it makes this ladder harder…
i’ll try to get victory under this issue, but i would appreciate if this could be fixed.