2
Hologram Interaction
Hey there,
So i've already made a post on this and it wasn't answered. I'm trying to make a map but i wanted to know: how can i make holograms interactable? I want it so if i right click on a hologram it will run a teleport command! If you have any idea on how this might work like even a suggestion that would be greatly appreciated!
-Emerald
So i've already made a post on this and it wasn't answered. I'm trying to make a map but i wanted to know: how can i make holograms interactable? I want it so if i right click on a hologram it will run a teleport command! If you have any idea on how this might work like even a suggestion that would be greatly appreciated!
-Emerald
Create an account or sign in to comment.
9
![Emerald_Mage's Avatar](https://static.planetminecraft.com/files/avatar/default.png)
I found a much simpler solution.
Make an armorstand invisible
Put an item on its head.
Set up an always active testfor command block
when ever you pick up the item make a command block clear you
Once you have been cleared put the command in a command block that you want above the conditional block.
Boom
(steps weren't clear i know)
Make an armorstand invisible
Put an item on its head.
Set up an always active testfor command block
when ever you pick up the item make a command block clear you
Once you have been cleared put the command in a command block that you want above the conditional block.
Boom
(steps weren't clear i know)
![Chaone's Avatar](https://static.planetminecraft.com/files/avatar/2409203_0.png)
You can use a button.
![ShelLuser's Avatar](https://static.planetminecraft.com/files/avatar/2013720_1.jpg)
I very much doubt that this is possible. Definitely in vanilla but even with mods you're going to have a hard time actually registering any interaction.
![Emerald_Mage's Avatar](https://static.planetminecraft.com/files/avatar/default.png)
I've seen multiple maps that have this feature such as Glarthford.
![ShelLuser's Avatar](https://static.planetminecraft.com/files/avatar/2013720_1.jpg)
First: have an emerald on me. Not only is this fitting for an Emerald_Mage but I honestly think you asked an interesting question here. And well, so far Glarthford seems like something I'm going to enjoy.
But to answer your question...
The hologram isn't the regular type of hologram that I'm familiar with (a common way to display these is by using invisible armor stand for example) but this is actually an entity of its own. In specific an area_effect_cloud:
/summon area_effect_cloud 108.0 20 -120 {Radius:0.5f,Duration:2147483647,Particle:"take",Tags:["lobby"],CustomName:"§7§lClick for Credits",CustomNameVisible:1}
I discovered this by putting the map into LAN mode, and then issuing this command: /execute @e[r=5] ~ ~ ~ say m000. You'll notice 4 entities: yourself, Fisherman, Click for Credits and CheckMiner. Gotcha! ;)
So they check the scoreboard for hits on this entity and when one registers it will then trigger a function which displays the credits: mctsts:mechanic/lobby/credits. I did skim the list of scoreboard objectives (/scoreboard objectives list) but there's a bit too much for my liking ;)
My assumption is that they're using dmg:
[16:22:02] [main/INFO]: [CHAT] - dmg: displays as 'dmg' and is type 'stat.damageDealt'
... but that is a wild guess. Heck, there are multiple ways to check for damage dealt to an entity.
But that's how this works: summon an area effect cloud with a custom name, make sure the name is visible, and then check for a hit on that entity.
But to answer your question...
The hologram isn't the regular type of hologram that I'm familiar with (a common way to display these is by using invisible armor stand for example) but this is actually an entity of its own. In specific an area_effect_cloud:
/summon area_effect_cloud 108.0 20 -120 {Radius:0.5f,Duration:2147483647,Particle:"take",Tags:["lobby"],CustomName:"§7§lClick for Credits",CustomNameVisible:1}
I discovered this by putting the map into LAN mode, and then issuing this command: /execute @e[r=5] ~ ~ ~ say m000. You'll notice 4 entities: yourself, Fisherman, Click for Credits and CheckMiner. Gotcha! ;)
So they check the scoreboard for hits on this entity and when one registers it will then trigger a function which displays the credits: mctsts:mechanic/lobby/credits. I did skim the list of scoreboard objectives (/scoreboard objectives list) but there's a bit too much for my liking ;)
My assumption is that they're using dmg:
[16:22:02] [main/INFO]: [CHAT] - dmg: displays as 'dmg' and is type 'stat.damageDealt'
... but that is a wild guess. Heck, there are multiple ways to check for damage dealt to an entity.
But that's how this works: summon an area effect cloud with a custom name, make sure the name is visible, and then check for a hit on that entity.
![Emerald_Mage's Avatar](https://static.planetminecraft.com/files/avatar/default.png)
Thanks for all your help!
![ShelLuser's Avatar](https://static.planetminecraft.com/files/avatar/2013720_1.jpg)
Now I'm intrigued and want to learn more :-)
I still have my doubts, but when I'm wrong I'm wrong. I shall look up the map, study it, and get back to you.
I still have my doubts, but when I'm wrong I'm wrong. I shall look up the map, study it, and get back to you.
![Scott's Avatar](https://static.planetminecraft.com/files/avatar/770275_4.png)
If its a server instead of a downloadable map, you could capture the EntityInteractEvent to determine when a click was fired, because armour stands are a living entity
![Emerald_Mage's Avatar](https://static.planetminecraft.com/files/avatar/default.png)
it will be a downloadable map, but thanks for explaining server wise