So I’m looking to differentiate between some hotspots that open subtitles dialogue, and some that open a little square or information on the hotspot on click beside the cursor position. And then to close once the cursor pulls away. How would I go about doing this?
Comments
Are you looking for help with repositioning the Hotspot label, or displaying additional "information"?
You'll need to share mockups / screenshots to illustrate exactly what you're going for.
I would like to display information at the hotspot, but listed like dialogue, where i can use Variable: Run sequence if i needed, or set off an action list or cutscene, but the dialogue is not from a character per se, so not 'spoken', and appears in a designed box next to the hotspot on use or examine and disappears when the cursor moves away? Hope that make sense!
You can hook into the OnHotspotSelect / OnHotspotDeselect events to e.g. turn on a menu. That menu could contain a Label element set to display a Global String variable, whose value is set by the script that hooks into the events before turning the menu on.
Are you able to get me started with a script for this? Would much appreciate it!
I would need the details asked for above.
Sorry, which info? I tried to answer your comments from October 8 on oct 9 post
Here you go:
https://www.dropbox.com/s/afbc5vl74g8czaz/Hotspot Option.pdf?dl=0
The most convenient way to work with that behaviour is to rely on regular speech Actions in your Hotspot's Interaction. If you use a fake NPC for the speech text, you can limit this NPC's speech text to a specific menu.
Having things close if the Player clicks/moves the cursor away can come later, but first create a separate Subtitles menu that is styled in the way you have above, set its Position type to Manual, and For speakers of type to Specific Characters Only, and then give it the name of your fake NPC.
Create an NPC by this same name and keep them hidden from view, but reference this NPC in your Hotspot's speech Action(s).
Also make sure to exlude this NPC from your regular Subtitles menu.
To have the menu appear over the Hotspot when clicked, attach this script to the NPC and fill in its Inspector:
ok, so this is currently not working, and I have followed the instructions above, but I have some questions:
See screenshots for detail.
Thanks!
https://www.dropbox.com/sh/67o1b3so3e9nglb/AAChB5ANKeXM7K3mgu9lDWgaa?dl=0
It can be anywhere in the scene - just don't assign any graphics to it.
If you're using an AC menu, comment out the line:
Remove the space in your "Character(s) to exclude" field.
Thanks, and if i want to offset the new hotspot box to the right or left of the hotspot how would i do that? Cheers Chris!
Hi, having some more positioning issues with this after updating script, see screenshots below:
https://www.dropbox.com/sh/yd1sal4r45eu05l/AABGFrj54bPWV2Wgy3FMtkLxa?dl=0
Please don't crop your screenshots - I need to get the full picture.
You will, however, need to uncomment the same line as before if you're not using Unity UI:
Thanks