设置点向


描述

This action is used to set a direction from a vector formed by the current position of the instance and the position given. You supply the x and y position to "point" at - these can be flagged as relative to the instance position - and the direction from the instance to that point will be used for the instance.


动作语法:

Set Point Direction Syntax


参数:

参数 描述
x The x component of the direction vector.
y The y component of the direction vector.


例如:

Set Point Direction Example
The above action block code checks checks to see if an instance of the object "obj_Player" exists in the room and if it does it then sets the direction of the instance to point towards the x/y position of "obj_Player".