2

Hologram Interaction

Emerald_Mage's Avatar Emerald_Mage1/1/18 4:51 am
2 emeralds 280 9
1/4/2018 7:08 pm
Emerald_Mage's Avatar Emerald_Mage
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
Posted by Emerald_Mage's Avatar
Emerald_Mage
Level 1 : New Miner
0

Create an account or sign in to comment.

9

Emerald_Mage
01/04/2018 7:08 pm
Level 1 : New Miner
Emerald_Mage's Avatar
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)
1
Chaone
01/04/2018 6:33 am
Level 6 : Apprentice Architect
Chaone's Avatar
You can use a button.
1
ShelLuser
01/01/2018 2:17 pm
Level 57 : Grandmaster Engineer
ShelLuser's Avatar
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.
1
Emerald_Mage
01/01/2018 8:16 pm
Level 1 : New Miner
Emerald_Mage's Avatar
I've seen multiple maps that have this feature such as Glarthford.
1
ShelLuser
01/02/2018 10:46 am
Level 57 : Grandmaster Engineer
history
ShelLuser's Avatar
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.
2
Emerald_Mage
01/04/2018 6:07 am
Level 1 : New Miner
Emerald_Mage's Avatar
Thanks for all your help!
1
ShelLuser
01/02/2018 9:09 am
Level 57 : Grandmaster Engineer
ShelLuser's Avatar
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.
1
Scott
01/01/2018 5:04 am
Level 40 : Master Droid
Scott's Avatar
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
1
Emerald_Mage
01/01/2018 5:30 am
Level 1 : New Miner
Emerald_Mage's Avatar
it will be a downloadable map, but thanks for explaining server wise
1
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome