31
Ask a Question / Re: Downloading Android SDK Results In Error [4.0]
« on: February 01, 2019, 02:41:30 am »
Okay, I'll give that a shot when I get the chance.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
You should be able to alter the angle by multiplying the part [absolute value of(blahblah)]. The more you multiply it, the higher angle it will be, though it will never be 90 (it would require x to be set to 0). Moreover, if the angle would be 90, the bullet would never corrected it's velocity toward the enemy.
Since the last post I have figure out it will probably be a little bit better if you put distance in attributes. Easier to read and only calculated once (x distance was calculated twice). So, together with the multiplier it would be something like that:Code: [Select]set xDistance to [x of enemy] - [x of self]
You can use whatever number as multiplier, 1 will get you the same result as without it (obviously), higher number should make the initial angle higher and number between 0 and 1 should make it lower.
set yDistance to [y of enemy] - [y of self]
then the velocity block with atan2(yDistance - ([absolute value of xDistance] * multiplier), xDistance)
...arrays will need to be set again after changing any values.