So I am trying to figure out if there's a command that can make a player mount or dismount a horse at any specific location. Also, is there a way to execute a command once that player dismounts the specific horse?
This may be a complicated way of doing it, but basically, the context of this is I'm trying to make security cameras that you can actually remotely see through by pressing a button. I know how to remotely wire a button to a command, but I want there to be an invisible horse at the camera's location that the player is forcibly mounted onto once they press the button. This would also allow for it to test for when they're done looking through the camera because as soon as they dismount, commands can bring them back to their original location.
If there are any simpler ways to make the cameras remotely work besides the horse method, I'm also happy to hear them! I just am used to using invisible horses to sit down places, and I was thinking it would work in this context since there's probably a parameter for mounting and dismounting, I just don't know what it is.
So I am trying to figure out if there's a command that can make a player mount or dismount a horse at any specific location. Also, is there a way to execute a command once that player dismounts the specific horse?
This may be a complicated way of doing it, but basically, the context of this is I'm trying to make security cameras that you can actually remotely see through by pressing a button. I know how to remotely wire a button to a command, but I want there to be an invisible horse at the camera's location that the player is forcibly mounted onto once they press the button. This would also allow for it to test for when they're done looking through the camera because as soon as they dismount, commands can bring them back to their original location.
If there are any simpler ways to make the cameras remotely work besides the horse method, I'm also happy to hear them! I just am used to using invisible horses to sit down places, and I was thinking it would work in this context since there's probably a parameter for mounting and dismounting, I just don't know what it is.
Thanks!
Why do you even want to mount on a horse?
Won't it be better to just repeatedly /tp the player at a specific entity (e.g. area_effect_cloud)?
Won't it be better to just repeatedly /tp the player at a specific entity (e.g. area_effect_cloud)?
I explained this in my original post. If the player is mounted on a horse, then when they dismount by pressing L Shift, the game can detect that they want to exit the camera view. If it repeatedly teleports them, how would they leave the camera view? Or is that what area effect cloud does? Can you explain what an area effect cloud is to an amateur like me? I’m familiar with the entity name, but I’ve never used it, as I wasn’t sure what it did.
I explained this in my original post. If the player is mounted on a horse, then when they dismount by pressing L Shift, the game can detect that they want to exit the camera view. If it repeatedly teleports them, how would they leave the camera view? Or is that what area effect cloud does? Can you explain what an area effect cloud is to an amateur like me? I’m familiar with the entity name, but I’ve never used it, as I wasn’t sure what it did.
Thanks for taking your time to respond!
Um... If that's the case, just tell them to sneak the whole time they're watching. Then once it's released, teleport them back. Or if you still prefer "click to watch, shift to return", it can still be done with the method I mentioned.
Also, area_effect_cloud is basically the entity that spawns when you throw a lingering potion on the ground. Yes, it's an entity, not merely particles.
What makes them so special is that you can set their Radius to 0 and Duration to a big number. You can teleport to it like the armor stand, but it has much less NBT data to store and thus causing less lag.
Cannot force them to mount, but we can force them to dismount.
But I wouldn't suggest you use horse/minecart either.
Tp them once the button is pressed.
Send them back once they sneak(L shift)
You didn't said which version you are working on, so here is the commands for the newest version.
scoreboard objectives add sneak minecraft.custom:minecraft.sneak_time
execute as @a[scores={sneak=1..}] at @s run teleport @s ~ ~5 ~
scoreboard players reset @a[scores={sneak=1..}] sneak
Ah! Thank you! It works! I haven't really used scoreboard for anything other than the dummy parameter, so I completely forgot you can test for when a certain button is pressed! Thank you so much!
So I am trying to figure out if there's a command that can make a player mount or dismount a horse at any specific location. Also, is there a way to execute a command once that player dismounts the specific horse?
This may be a complicated way of doing it, but basically, the context of this is I'm trying to make security cameras that you can actually remotely see through by pressing a button. I know how to remotely wire a button to a command, but I want there to be an invisible horse at the camera's location that the player is forcibly mounted onto once they press the button. This would also allow for it to test for when they're done looking through the camera because as soon as they dismount, commands can bring them back to their original location.
If there are any simpler ways to make the cameras remotely work besides the horse method, I'm also happy to hear them! I just am used to using invisible horses to sit down places, and I was thinking it would work in this context since there's probably a parameter for mounting and dismounting, I just don't know what it is.
Thanks!
Memelord and general minecraft enthusiast
Why do you even want to mount on a horse?
Won't it be better to just repeatedly /tp the player at a specific entity (e.g. area_effect_cloud)?
I explained this in my original post. If the player is mounted on a horse, then when they dismount by pressing L Shift, the game can detect that they want to exit the camera view. If it repeatedly teleports them, how would they leave the camera view? Or is that what area effect cloud does? Can you explain what an area effect cloud is to an amateur like me? I’m familiar with the entity name, but I’ve never used it, as I wasn’t sure what it did.
Thanks for taking your time to respond!
Memelord and general minecraft enthusiast
Um... If that's the case, just tell them to sneak the whole time they're watching. Then once it's released, teleport them back. Or if you still prefer "click to watch, shift to return", it can still be done with the method I mentioned.
Also, area_effect_cloud is basically the entity that spawns when you throw a lingering potion on the ground. Yes, it's an entity, not merely particles.
What makes them so special is that you can set their Radius to 0 and Duration to a big number. You can teleport to it like the armor stand, but it has much less NBT data to store and thus causing less lag.
Cannot force them to mount, but we can force them to dismount.
But I wouldn't suggest you use horse/minecart either.
Tp them once the button is pressed.
Send them back once they sneak(L shift)
You didn't said which version you are working on, so here is the commands for the newest version.
Ah! Thank you! It works! I haven't really used scoreboard for anything other than the dummy parameter, so I completely forgot you can test for when a certain button is pressed! Thank you so much!
Memelord and general minecraft enthusiast