Forum rules - please read before posting.

Cycle hotspots on non-direct movement

Hey,

Is there a way to use Cycle hotspots functionality without movement method being Direct? Why is that option disabled if I set movement to none?(So I can use custom movement)

I have a situation where I need to have both point and click, and gamepad movement. But I can't use Direct movement method as it's 2.5D game and walk paths are unsuitable for gravity based controls. So I want to try custom controls that take gamepad axis and translate those to navmesh destination and move character like that with gamepad. But I'd like to use player vicinity hotspot detection with Cycle Hotspot option with that.


Comments

  • edited November 2018
    I'll consider lifting the restriction.
  • Thanks, meanwhile if wanted to lift it in source code, what would be best approach?
  • Refreshing my memory of this, the restriction is there because of the interlinking of click-based movement and a Hotspot detection system that ignores the mouse position.

    Set your Hotspot detection method to Custom Script, and your Movement method to Point And Click.  If the now-hidden Hotspots in vicinity field was set to Cycle Multiple, then it'll still be accessible via the DetectHotspots component - and a simple script can update the active Hotspot accordingly:


    Again though, clicking the mouse (or invoking the InteractionA) input will override the movement system and always trigger the Hotspot interaction regardless of the cursor's position.  Therefore, you'll either need your custom movement system to rely on a different input to trigger movement, or a custom interaction system to rely on a different input to trigger Hotspots.  For more, see the Manual's "Custom interaction systems" chapter.
  • Thanks! That worked for hotpot selection, but it does not "Select" a hotspot so highlight system can work. What is the best way to make hotspot selected as well? I tried using

                if (KickStarter.player.hotspotDetector.GetSelected() != null)
                    KickStarter.player.hotspotDetector.GetSelected().Select();
    but then if I cycle through hotspots old ones don't get deselected. 

    One other thing I have trouble finding is, if I wanted to set a new destination for AC to calculate path towards where can I do that? Like when Point and Click system sets a destination to where you clicked, to simulate that towards custom destination?

  • You can record the previously-selected Hotspot to deselect it:


    You can have a character pathfind to a given point with their MoveToPoint method.
  • Hey, thanks!
    This seemed to do the trick. I'm moving character on Navmesh with gamepad axis directions and cycling through hostpots based on proximity.
    For a 2.5D game with uneven walk mesh looks like this is a good solution.
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.