It's in the Expression Editor. Some of the Rules and behaviors have a little 'e' button. Click that to open the editor. VectorToAngle is located in the 'insert function:' drop down in the expression editor.
Check out the Support Section up above. Especially the Reference Library. It explains the Expression Editor in-depth.
It can be used for a great variety of things, but hose are some basic uses...
shot in the dark diggin up this thread, but I'm trying to do this very thing. Which Behavior do I use to have npc1 shoot a bullet at player1. I've got a constrain for player1 x and y, but no matter which behavior i use the bullet seems to either freeze the screen to fire upwards no matter where the player is. Some of the Behaviors have 1 E and some have 2, which would i use for this type of expression?
Comments
It works like this:
myAngle = vectorToAngle(Actor1.X - Actor2.X, Actor1.Y - Actor2.Y)
Let's say you wanted Actor 1 to fire a bullet at Actor 2. You would use this formula to find the angle of trajectory.
Let's say you wanted Actor 1 to fire at the Mouse cursor position, you would do this:
myAngle = vectorToAngle(Actor1.X - Mouse.X, Actor1.Y - Mouse.Y)
It can be used for a great variety of things, but hose are some basic uses...
Or is it one of the behaviours?
confuseddd.
Check out the Support Section up above. Especially the Reference Library. It explains the Expression Editor in-depth.
Which Behavior do I use to have npc1 shoot a bullet at player1. I've got a constrain for player1 x and y, but no matter which behavior i use the bullet seems to either freeze the screen to fire upwards no matter where the player is. Some of the Behaviors have 1 E and some have 2, which would i use for this type of expression?