# path_insert_point

## Inserts a point into the given path at a set
position.

**Syntax:**

path_insert_point(index, n, x, y, speed);

Argument |
Description |

index |
The index of the path to insert the point into. |

n |
The defining point to insert the new point BEFORE. |

x |
The x coordinate (relative to the path) of the new point. |

y |
The y coordinate (relative to the path) of the new point. |

speed |
The speed factor of the point. |

**Returns:** N/A

### Description

With this function you can insert a new point into a path (the
path can have been created in the path editor or through code using
`path_add`). The point will be
added into the path before the point "n" that is specified in the
function.

### Example:

path_insert_point(mypath, 0, 50, 50, 100);

This will insert a point at the very beginning of the path
indexed in the variable "mypath", at (50,50), with a speed factor
of 100%.

##### © Copyright YoYo Games Ltd. 2015 All Rights Reserved