Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

mp_linear_object

CryoEagle edited this page Feb 11, 2019 · 1 revision

mp_linear_object

Returns false when colliding with a specified object while moving with object

Syntax:

mp_linear_object(Xgoal, Ygoal, StepSize, obj)
Argument Description
float Xgoal Target X position to move
float Ygoal Target Y position to move
int StepSize Pixels to move per call
Type obj StepSize Object that is checked for collision

Returns: bool

Description:

This function will move with an object to a target position if an object will collide with a specified object, a function will return false.

Example:

if (mp_linear_object(10,10,20,typeof(oBrick)) == false)
{
 show_message("hello world");
}

Above code will move with an object to X: 10, Y:10, if there will be an object named oBrick in a way function, will return false.

Back to Motion Planning

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /