- Joined
- Sep 6, 2020
- Messages
- 36
- Reaction score
- 22
Hi y'all. Functions are an important part of DiamondFire. They're one of the most important features, and an integral part of larger, more complicated code constructions. This is my thorough guide to using and applying them, including some useful applications of them.
Part 1: How to use and apply Functions
Functions work in two parts: Call Function, and the Function itself. The code logic behind is very simple. You are calling your function, basically a "warp" over to your function, then as soon as the function is read, it returns to the original line of code (the exact place it was called). Function usage is further explained through the images in part 2.
You can also name functions to stay organized by right clicking the Function with the name of your function first, then right clicking your Call Function last. You can also change the icon of your function by putting the item you want to use in the Function chest for extra organization.
Part 2: Applications of Functions
* Basic use of Functions: Continuing lines after you run out of space
* Funneling multiple lines into one function to save large (or short) amounts of time
* One long "main" line with "pocket warps" for different sections of the line
Note:
Functions are not async, so the main line will be read up until it hits a function, then read the function. It will not read both lines at the same time, no matter what. It will always read the function first before continuing, no matter what. For asynchronous code and Processes, see here.
Part 1: How to use and apply Functions
Functions work in two parts: Call Function, and the Function itself. The code logic behind is very simple. You are calling your function, basically a "warp" over to your function, then as soon as the function is read, it returns to the original line of code (the exact place it was called). Function usage is further explained through the images in part 2.
You can also name functions to stay organized by right clicking the Function with the name of your function first, then right clicking your Call Function last. You can also change the icon of your function by putting the item you want to use in the Function chest for extra organization.
Part 2: Applications of Functions
* Basic use of Functions: Continuing lines after you run out of space
* Funneling multiple lines into one function to save large (or short) amounts of time
* One long "main" line with "pocket warps" for different sections of the line
Note:
Functions are not async, so the main line will be read up until it hits a function, then read the function. It will not read both lines at the same time, no matter what. It will always read the function first before continuing, no matter what. For asynchronous code and Processes, see here.
Last edited: