Posts by Monad

by Monad
20 Jun 2020, 2:12
Forum: TeaScript
Topic: Question and help: Angles, Bitmap and Player Position
Replies: 3
Views: 1031
  • 1

Re: Question and help: Angles, Bitmap and Player Position

Actually the mathematically accurate way to do this is the following: do with bitmap(1) .rotatang = atan2(.desty + 0.5 * .scrheight - (char(1).y + 0.5 * char(1).pheight), .destx + 0.5 * .scrwidth - (char(1).x + 0.5 * char(1).pwidth)) end with call sleep(1) loop script atan2(y as double, x as double,...
by Monad
6 May 2020, 3:57
Forum: TeaScript
Topic: Question and help: Moving Projectile in terms of Speed and Angle (cos and sin)
Replies: 1
Views: 1092
  • 1

Re: Question and help: Moving Projectile in terms of Speed and Angle (cos and sin)

You can do it by very simple trigonometry dim angle as double dim speed as double with npc(sysval(param1)) .xsp = cos(angle) * speed .ysp = -sin(angle) * speed That way you can control an NPC not by two coordinates (cartesian plane) but by its angle and speed, which are respectively equivalent the a...

Go to advanced search