Move_outside_object - hpgDesigns/hpgdesigns-dev.io GitHub Wiki

Description

Moves the instance in the direction (angle) until a contact position with the specified object is reached. If a collision is met the instance will continue to move around the object.

Parameters

Parameter Data Type Description
object integer objects to check moving against. can be an id, object index of keyword all
angle double the direction to move contact in
dist double the maximum distance to move. when set to -1 does not set a maximum distance (optional, default set to 1000000)
solid_only boolean whether to only move against solid instances or not (optional, default set to false)

Return Values

double: Returns the distance the instance has moved.

Example Call

//moves the instance down avoiding a collision with an instance of obj_block
move_outside_object(obj_block, 270, -1);

NOTOC