HelpHow to use TossEnemy behavior?

Posts 1–3 of 3 · Page 1 of 1
How to use TossEnemy behavior?
I don't know how the angle works, could someone explain me?
Code:
            var chr = Host as Character;
            Position target = new Position()
            {
                X = Host.Self.X,
                Y = Host.Self.Y
            };
            target.X += (float)Math.Cos(angle) * range;
            target.Y += (float)Math.Sin(angle) * range;
With angles in RotMG Pservers, you should always use
Code:
ANGLE * (float)Math.PI / 180
So if you want something to toss an enemy at an angle of 50, instead of
Code:
TossEnemy.Instance(50, 9, 0x0d08),
You should do
Code:
TossEnemy.Instance(50 * (float)Math.PI / 180, 9, 0x0d08),
Posts 1–3 of 3 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us