Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
I made a screenshot of a function that I'm using to make bots fuel the furnaces. You can see on the left the cyan block that's a set variable and it's transmitting its value (32:27 the coordinates of one of my furnaces) to all the other blocks that use the same coordinates through the green line connectors.
https://steamcommunity.com/sharedfiles/filedetails/?id=3165821992
So you can change the value in the cyan block (the variable) to modify the value of all the other blocks that it's connected to through the green lines.
In this case the variable I'm using is an "input" variable (you find them in the functions tab if you have unlocked them) that means that it's inheriting its value from another variable that I've manually set in another function (check the screenshot below, you see the same value 32:27 that's been inputted in another function through a green line). You can also see that I'm using another variable with the coordinate of another furnace (24:23) that's been inputted in another instance of the same function, so basically I can use the same function to fuel different furnaces by simply changing the values of the two variables (one for each furnace) in the function in the screenshot below.
https://steamcommunity.com/sharedfiles/filedetails/?id=3165822192
I'm sorry if this can be a bit confusing but it's very simple once you get the hang of it, just experiment a bit and you'll get it easily!
Below you find a more advanced use of variables:
https://steamcommunity.com/sharedfiles/filedetails/?id=3165836776
In this case I'm using the "find" variable to look for wood from a source (from trees and furnaces but not from storages) once the bot finds a source it gets its coordinates and then compare them to the other two variables that I've manually put in that are the coordinates of my two furnaces, if the values matches then it means that the bot has located one of the two furnaces so it's going to avoid them and look from another source to collect wood, so this way it doesn't get the wood out of the furnaces and instead it only collects it from trees.
You see you can do a lot of stuff with variables!
Wow, thank you for this detailed and thought out explanation! You helped me understand it so much better!
Eager to play around with it later! Should help with my campfire problem!
One more follow up question. What's the difference between find and pick and just find then pick from like you have in your last example?
The command "find and pick" makes the bot look for the closest tile with the item that you've specified and it goes and pick it up. You can also specify to only pick things either from the storage, from the ground or from a source (furnaces and bonefires also count as source apparently) or any combination of those.
Essentially using the "find" variable allows for more articulate actions while "find and pick" is a straight forward command but is more limited. So in my example I needed to add an exception to which tiles the bot could pick up wood from, so I needed to use the "find" variable to then make a comparison and check if those tiles were the same as my furnaces, so in that case the bot wouldn't pick the wood from those and move on to the next action.
This one is a little harder to wrap my head around but I have enough to go off of and start playing around with it.
Thank you SO much!
Is this a setup for one singular furnace? Do you have to set one up for each furnace or is there a way to tell one or two bots to go through all furnaces and fuel them? Appreciate it!
Basically I use a function that contains the coords of the funaces that I want to fuel:
https://steamcommunity.com/sharedfiles/filedetails/?id=3168048810
You can see that I've placed the variables pretty much in the same pattern of the furnaces on the map, so it's easier for me to add, remove or move around the furnaces without messing up the program.
I've assigned one bot that is going to loop around those furnaces and keep them fueld, and if it can't find wood then it's going to help with tree farming and then go back to the furnaces:
https://steamcommunity.com/sharedfiles/filedetails/?id=3168048404
why i can't make a function to set position ,if i can , i will easy to control my bot to do anything
https://steamcommunity.com/sharedfiles/filedetails/?id=3168594340
is this mean one function only can make one position out?
it would need to look something like this: https://imgur.com/a/BgF3irm
in my example here the bot will continue to move from left to right and vice versa, just by using 1 move command. in order to change a variable u need to have at least 2 signals linked to the input of a variable.
so to explain how my example works:
the entire loop starts bot sets the variable to the value of "input 1" the variable is setting the move location in the move command to the value of "input one and the bot moves there, once the bot reaches the destination the comperator is comparing the value of the variable to the value of "input 1" since those r equal right now the "assign"-trigger is setting the value of the variable to the value of "input 2" which is setting the destination for the move command to the value of "input 2", since its routed back to the move command the bot is moving from the location of "input 1" to the location of "input 2" since all this is happening before the comperator is comparing a 2nd time, the now unequal value will only be compared after the bot reached the location of "input 2", with the unequal comperator result the signal/bot is routed out of the function, which in this case means it just goes to idle and the entire loop restarts, and the bot is setting the variable in the function to the value of "input 1" again, ergo the bot moves back from the location of "input 2" to the location of "input 1"
i hope this explanation on my little example shows u that ur stuff could have never worked because ur not changing values of any of ur variables, in ur screenshot, and ur also not doing anythign with a change that could have happened