Created Offset (markdown)

bi0qaw 2017-11-25 15:01:16 +01:00
parent 3b63218c7d
commit b45fe6fc73

27
Offset.md Normal file

@ -0,0 +1,27 @@
## Vectors
```
vectors %vectors% offset by %vectors%
```
## Locations
```
%locations% offset by %vectors%
```
Adds each offset to all locations or vectors. You will usually use this to move some vectors to a location. Example:
```
set {_vector-circle::*} to circle with radius 5 and density 5 #creates a circle
set {_location-circle::*} to location at player offset by {_vector-circle::*} #gives the locations in the shape of the circle around the player
```
You can also chain this expression for more complicated things like:
```
set {_cube::*} to cube with radius 5 #creates a cube
set {_circle::*} to circle with radius 2 and density 5 #creates a circle
set {_cube-circles::*} to {_cube::*} offset by {_circle::*} #creates a circle at each vertice of the cube
show happy villager at player offset by {_cube-circles::*}
```
Which gives you green particles in the shape of 8 circles at the cube vertices as can be seen in the following image:
![](https://i.imgur.com/8A10DmU.png)