For this game I'm working on a food order system. There's a Redstone randomiser which powers a command to say what order the villager wants. The trouble is the time restriction. I want there to be unlimited time to give the order to the villager. Once the order is given (e.g. item is in chest) the redstone signal continues. Is there a possible way of making this happen??
I would just like to point out that it's bad practice to mix redstone and commands. If possible, restrict yourself to all commands or all redstone. Randomization can also be accomplished with commands.
Rollback Post to RevisionRollBack
This forum has somewhat of a workaround for inline code formatting, but it still uses BBCode, which kinda sucks.
Yeh I think that's going to be the only way forward. I'm new to this command stuff (as you can prob tell). Placing loads and loads of repeaters is driving my mad ngl. How do you link commands together without the use of Redstone. I'm assuming it could be done via chains. I'm particularly interested in how to create time-delays between commands also. Thanks
Since you seem to be just starting off with commands, it's okay to use command blocks for now, but once you begin to make large projects, you should begin to switch to using data packs and functions, which are the primary way of creating command contraptions. Command blocks are much more limited.
But in terms of command blocks, there are two ways to delay command blocks from executing, both of which can seem daunting to beginners but you'll have to learn them if you want to do this:
Scoreboard timer
Scoreboard timers are a very old but reliable way of keeping track of time. It involves a scoreboard that counts up every tick (0.05 seconds = 1 tick) and executes commands when it hits certain points. You'll need to set up a scoreboard objective first to hold values:
scoreboard objectives add timer
Then you have a repeating command block that counts up:
scoreboard players add time timer 1
Then you can detect when the score of time in timer matches the value then do something
execute if score time timer matches 300.. run …
And that's it for the scoreboard timer, Daunting but you'll need to learn scoreboards to take advantage of this one!
Area Effect Cloud method
The Area Effect Cloud method is also very daunting, involving complex NBT data and detection. I don't have enough time to write about it right now but I may edit this later.
For this game I'm working on a food order system. There's a Redstone randomiser which powers a command to say what order the villager wants. The trouble is the time restriction. I want there to be unlimited time to give the order to the villager. Once the order is given (e.g. item is in chest) the redstone signal continues. Is there a possible way of making this happen??
I would just like to point out that it's bad practice to mix redstone and commands. If possible, restrict yourself to all commands or all redstone. Randomization can also be accomplished with commands.
This forum has somewhat of a workaround for inline code formatting, but it still uses BBCode, which kinda sucks.
Yeh I think that's going to be the only way forward. I'm new to this command stuff (as you can prob tell). Placing loads and loads of repeaters is driving my mad ngl. How do you link commands together without the use of Redstone. I'm assuming it could be done via chains. I'm particularly interested in how to create time-delays between commands also. Thanks
You could set it to air, then summon falling blocks, although I don't know if you could change the direction of the falling blocks.
it would be a lot easier if you could change data, but repeaters sadly aren't tile entities T^T
uh so my name is actually ephf but I don't know how to change it
Since you seem to be just starting off with commands, it's okay to use command blocks for now, but once you begin to make large projects, you should begin to switch to using data packs and functions, which are the primary way of creating command contraptions. Command blocks are much more limited.
But in terms of command blocks, there are two ways to delay command blocks from executing, both of which can seem daunting to beginners but you'll have to learn them if you want to do this:
Scoreboard timer
Scoreboard timers are a very old but reliable way of keeping track of time. It involves a scoreboard that counts up every tick (0.05 seconds = 1 tick) and executes commands when it hits certain points. You'll need to set up a scoreboard objective first to hold values:
Then you have a repeating command block that counts up:
Then you can detect when the score of time in timer matches the value then do something
And that's it for the scoreboard timer, Daunting but you'll need to learn scoreboards to take advantage of this one!
Area Effect Cloud method
The Area Effect Cloud method is also very daunting, involving complex NBT data and detection. I don't have enough time to write about it right now but I may edit this later.
This forum has somewhat of a workaround for inline code formatting, but it still uses BBCode, which kinda sucks.