157 posts
Posted 20 April 2014 - 05:36 PM
I think it would be a lot better, if you could do something like command("/say hi"), although this can only be enabled in a config, and is disabled by default, or somehow made for admin use only. And also, you can use testfor command by doing if command("/testfor @p") then print("player is online") end. So it returns a true/false like a comparator would do. This would also allow multiple commands to be done at the same time, so you could do a 100 commands at the same time if you wanted to, this isn't lag efficient although if it's only allowed for OPs than it shouldn't be bad. I'd like this because when computercraft updates to 1.7.2, I'd like to use commands rather than thousands of command blocks for certain tasks such as shooting a projectile in the player's facing direction, so I wouldn't have to use wired modems and things.
Regards,
Augustas
1140 posts
Location
Kaunas, Lithuania
Posted 20 April 2014 - 06:02 PM
Dan200 was talking about something similar to this on reddit…
Although, why in the world would you need more than one Command Block when you have ComputerCraft. You can already wrap the Command Block (if enabled in the config) and run commands. All you would need to do is setup your program to quickly switch between commands. Or are there any issues when you are changing and running commands too fast?
Edited on 20 April 2014 - 04:02 PM
162 posts
Posted 25 April 2014 - 11:47 AM
Dan200 was talking about something similar to this on reddit…
Although, why in the world would you need more than one Command Block when you have ComputerCraft. You can already wrap the Command Block (if enabled in the config) and run commands. All you would need to do is setup your program to quickly switch between commands. Or are there any issues when you are changing and running commands too fast?
A good thing would be adding command blocks as a peripheral and not run by it self, so you do:
comBlock = peripheral.wrap( side )
comBlock.runCommand( command )
1140 posts
Location
Kaunas, Lithuania
Posted 25 April 2014 - 01:26 PM
A good thing would be adding command blocks as a peripheral and not run by it self, so you do:
comBlock = peripheral.wrap( side )
comBlock.runCommand( command )
You can already do this, if enabled in config.
162 posts
Posted 25 April 2014 - 01:44 PM
A good thing would be adding command blocks as a peripheral and not run by it self, so you do:
comBlock = peripheral.wrap( side )
comBlock.runCommand( command )
You can already do this, if enabled in config.
can we? how?
671 posts
Location
That place over there. Y'know. The one where I am.
Posted 25 April 2014 - 01:52 PM
can we? how?
Go into the CC config and there should be a line that ssys something along the lines of allowCommandBlockPeripheral. (or something, I didn't actually check the config.) Set that to true.
162 posts
Posted 25 April 2014 - 02:05 PM
can we? how?
Go into the CC config and there should be a line that ssys something along the lines of allowCommandBlockPeripheral. (or something, I didn't actually check the config.) Set that to true.
ok. Thanks
157 posts
Posted 25 April 2014 - 05:53 PM
Can I just ask, is it possible for me to have a single command block at the back of an advanced computer, and by running a program, it sets 100 uinque commands and executes them after settings, so set, then execute, this repeated 100 times, and the commands would be executed in 1 tick or, like a few more, perhaps because of lag or something, so? If so, shouldn't have bothered posting this suggestion xD
ALSO, very important, if not, then this is a very simple feature that I would really like to be implemented, true / false return statement if the command was successfully executed or not, so runCommand, and then a /testfor, if yes then true, if not the false. You get that, is it possible? If not, this limits a lot of what you can do with command block :C
Edited on 25 April 2014 - 03:55 PM
7083 posts
Location
Tasmania (AU)
Posted 26 April 2014 - 12:50 AM
Can I just ask, is it possible for me to have a single command block at the back of an advanced computer, and by running a program, it sets 100 uinque commands and executes them after settings, so set, then execute, this repeated 100 times, and the commands would be executed in 1 tick or, like a few more, perhaps because of lag or something, so?
Yes, you can do something like that. Take a look at the
command block API if you haven't already.
ALSO, very important, if not, then this is a very simple feature that I would really like to be implemented, true / false return statement if the command was successfully executed or not, so runCommand, and then a /testfor, if yes then true, if not the false. You get that, is it possible? If not, this limits a lot of what you can do with command block :C
Apparently the current API does not return values based on the results of executed commands. The most you can pull out of it is the current command stored in the block.
5 posts
Posted 14 May 2014 - 05:30 PM
That would be nice.
but on a side note, i posted a suggestion like you did but, dan200 locked it saying:
"It's not gonna happen. You can already use command blocks as peripherals, so all you'd need to do is throw a computer in a bedrock box with a command block. Moved and locked."
and nows he's doing it, Lol.
8543 posts
Posted 14 May 2014 - 05:34 PM
That wasn't dan, it was me. Given recent postings by dan on reddit, it would appear I was incorrect!
5 posts
Posted 14 May 2014 - 05:43 PM
Yeah, i just saw that sorry.
280 posts
Location
Earth
Posted 14 May 2014 - 10:32 PM
You could also write a function that replaced the command and runs it in one function. If you are really swapping commands that much.