- Joined
- Sep 6, 2020
- Messages
- 36
- Reaction score
- 22
Hi y'all. Locations are an important tool used in DiamondFire. They can be used in a multitude of ways, including usage within Set Variable. This guide will go over the basics and more on how to use Set Variable: List Manipulation, as well as extra tips on general information about locations.
Locations are mappings of coordinates. DiamondFire's locations use Minecraft's coordinate plane. For more information regarding Minecraft coordinates, please refer to this tutorial.
Part 1: How to use Location Variables
Locations can be found within your Values item in your dev inventory. You can set locations to your location, which sets the location to your X, Y, Z, pitch, and yaw coordinates up to the nearest hundredth. You can also set the location to a block's location. Things to note when you set locations to blocks are that the pitch and yaw is set to 0, and the X, Y, and Z will always be set halfway up each coordinate. So, clicking on a block at X 52 will set the location's coordinate to X52.5. Wacky. Provided below is an image of the visual confirmation you see when selecting a location.
Part 2: How to Apply Location Variables
There's a lot of different ways you can use location variables. Here are the different Set Variable actions for Locations.
Set Coordinate: Sets a variable to a location that you will change. You can change any single coordinate at a time. Not putting in a location (just putting in a variable and a number) means that you need to have your variable already set to a location, so that the variable sets itself to the updated location (This goes for all SetVar actions that require an *Optional location, so I will specify this only once). Can use world coordinates or plot coordinates. Works with game values.
Set All Coordinates: Exactly the same as Set Coordinate but you can change all the values at once instead of only 1. Can use world coordinates or plot coordinates. Works with game values.
Tip: In case you ever want to only change a couple values and not all of them, you can use game values and set those coordinates to the equivalent game value. It's basically like setting a coordinate to itself!
Get Coordinate: Obtains the X, Y, Z, pitch, or yaw of a location. Also known as parsing. Can use world coordinates or plot coordinates. Works with game values.
Shift on Axis: Moves a location by a defined amount on a specific axis. It's a "shift." Positive shifts on the X axis will move the location's X coordinate positive, negative shifts on the Z axis will move the location's Z axis negative, and so on. Works with game values.
Shift on All Axes: Same thing as Shift on Axis, but you can change all of them at once. Works with game values.
Tip: If you want to shift only a few axes, just place a 0 in for the ones you don't wish to shift. Shift by zero = doesn't move.
Shift in Direction: Tiny bit different than Shift on Axis. Uses general directions like in 2d, 3d, and sideways instead of axes. Works with game values (?)
Shift in All Directions: Same as Shift in Direction, but includes every direction.
Shift Towards Location: Moves a location a certain distance towards another location. If locations are separated by three dimensions, all three dimensions will be used to move the location closer.
Shift Rotation: Same as Shift on Axis but with pitch and yaw instead of X, Y, and Z. Works with game values.
Face Location: Makes a location face another location. You can either have the location face away or towards the location. I assume that by "facing away," it means that they will face 180° degrees apart from each other. Works with game values.
Align Location: Moves a location to the center or corner of the block it is in. Rotation and what coordinates are moved is optional. Works with game values.
Get Distance: Obtains the distance between two locations. Can choose between 2D distance (X/Z), 3D distance (X/Y/Z), and altitude (Y). Works with game values.
Find Center: Finds the average position of the given locations. Works with game values.
Set to Random Location: Sets the variable to a random location between two locations. Works with game values.
Face Direction: Rotates a location to face a direction. You can choose to have it face the direction selected, or the opposite of the direction selected. Works with game values.
Get Direction: Obtains the direction a location is rotated in. Optional returns of all directions (north, east, south, west, up, down), cardinal directions (north, east, south, west), or latitude (up & down). Works with game values.
Part 3: Applications of Locations
Locations represent the little things that are required to make things work, the behind-the-scenes stuff. There are a lot of general applications that I could list, such as teleporting players at the right time, or shifting a location to use SetBlock, but there are many more. Locations are an integral part to DiamondFire, and Set Variable extends the usefulness and importance of the Location.
Part 4: Resources
Lists
Item Variables
Select Object
Functions
Plot Commands
Locations are mappings of coordinates. DiamondFire's locations use Minecraft's coordinate plane. For more information regarding Minecraft coordinates, please refer to this tutorial.
Part 1: How to use Location Variables
Locations can be found within your Values item in your dev inventory. You can set locations to your location, which sets the location to your X, Y, Z, pitch, and yaw coordinates up to the nearest hundredth. You can also set the location to a block's location. Things to note when you set locations to blocks are that the pitch and yaw is set to 0, and the X, Y, and Z will always be set halfway up each coordinate. So, clicking on a block at X 52 will set the location's coordinate to X52.5. Wacky. Provided below is an image of the visual confirmation you see when selecting a location.
Part 2: How to Apply Location Variables
There's a lot of different ways you can use location variables. Here are the different Set Variable actions for Locations.
Set Coordinate: Sets a variable to a location that you will change. You can change any single coordinate at a time. Not putting in a location (just putting in a variable and a number) means that you need to have your variable already set to a location, so that the variable sets itself to the updated location (This goes for all SetVar actions that require an *Optional location, so I will specify this only once). Can use world coordinates or plot coordinates. Works with game values.
Set All Coordinates: Exactly the same as Set Coordinate but you can change all the values at once instead of only 1. Can use world coordinates or plot coordinates. Works with game values.
Tip: In case you ever want to only change a couple values and not all of them, you can use game values and set those coordinates to the equivalent game value. It's basically like setting a coordinate to itself!
Get Coordinate: Obtains the X, Y, Z, pitch, or yaw of a location. Also known as parsing. Can use world coordinates or plot coordinates. Works with game values.
Shift on Axis: Moves a location by a defined amount on a specific axis. It's a "shift." Positive shifts on the X axis will move the location's X coordinate positive, negative shifts on the Z axis will move the location's Z axis negative, and so on. Works with game values.
Shift on All Axes: Same thing as Shift on Axis, but you can change all of them at once. Works with game values.
Tip: If you want to shift only a few axes, just place a 0 in for the ones you don't wish to shift. Shift by zero = doesn't move.
Shift in Direction: Tiny bit different than Shift on Axis. Uses general directions like in 2d, 3d, and sideways instead of axes. Works with game values (?)
Shift in All Directions: Same as Shift in Direction, but includes every direction.
Shift Towards Location: Moves a location a certain distance towards another location. If locations are separated by three dimensions, all three dimensions will be used to move the location closer.
Shift Rotation: Same as Shift on Axis but with pitch and yaw instead of X, Y, and Z. Works with game values.
Face Location: Makes a location face another location. You can either have the location face away or towards the location. I assume that by "facing away," it means that they will face 180° degrees apart from each other. Works with game values.
Align Location: Moves a location to the center or corner of the block it is in. Rotation and what coordinates are moved is optional. Works with game values.
Get Distance: Obtains the distance between two locations. Can choose between 2D distance (X/Z), 3D distance (X/Y/Z), and altitude (Y). Works with game values.
Find Center: Finds the average position of the given locations. Works with game values.
Set to Random Location: Sets the variable to a random location between two locations. Works with game values.
Face Direction: Rotates a location to face a direction. You can choose to have it face the direction selected, or the opposite of the direction selected. Works with game values.
Get Direction: Obtains the direction a location is rotated in. Optional returns of all directions (north, east, south, west, up, down), cardinal directions (north, east, south, west), or latitude (up & down). Works with game values.
Part 3: Applications of Locations
Locations represent the little things that are required to make things work, the behind-the-scenes stuff. There are a lot of general applications that I could list, such as teleporting players at the right time, or shifting a location to use SetBlock, but there are many more. Locations are an integral part to DiamondFire, and Set Variable extends the usefulness and importance of the Location.
Part 4: Resources
Lists
Item Variables
Select Object
Functions
Plot Commands