Forum rules - please read before posting.

[Feature Suggestion] Distance from hotspot, default "too far away" interaction override?

Thanks Chris in the previous discussion of this for mentioning using Custom Actions:

Your custom Action (which checks the distance between the Player and the Hotspot) can be set up to call an ActionList asset to perform the "It's too far away" speech line.  This way, you'll only need to rely on one Action at the front of each Interaction.  You can also parameterise the Action so that the Hotspot is assigned to this custom Action automatically.

That's a great idea, and with the action already preset in the prefab, it would be convenient. I have no experience with writing custom actions, so I'll have to look into it, but I also wanted to suggest this as a feature request if it seemed useful enough or not too difficult to implement? I imagine there could be a couple of AC Settings, one for the distance raycast for how far it would be away from the player, and the option to assign a default interaction to this (I would just have a dialog line, but for other first-person games, a hand could animate out to reach and speak, or for a third person game, the player model could lunge and speak). I imagine it could be useful for both 1st and 3rd person games that use directly-controlled players?

Anyways, I really appreciate the custom action method, I'll take a look into working out how to write one for now! :D

Comments

  • Thinking about it, a custom Action isn't necessary - you can do this by hooking into the OnHotspotInteract custom event to momentarily override the Hotspot's Interaction settings:


  • Oh wow, so that just goes on the interactions prefab? This could be useful to anyone else who needs this functionality, I'll give it a try, thanks!
  • No, just place it once on a single GameObject per scene.  It's just an example, so it runs the same fallback ActionList each time - but can be modified for per-Hotspot variety etc if needed.
  • Ahh of course, thanks!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.