Show all interactables on keypress

Started by fernewelten, Mon 20/01/2020 21:06:17

Previous topic - Next topic

fernewelten

Hi folks,

The adventure that I currently play has a mechanism where whenever you hit and hold a certain key, all the objects, hotspots, and characters that you can interact with are pointed out with animated arrows.

I wonder how this can be reproduced in AGS.

The straightforward way would be to define an invisible "pointing" object for each object, hotspot, and character in each room. Whenever the player hits the magic key, move the "pointing" objects above the things they point to (beware of characters and objects that are currently moving) and set the "pointing" objects visible. When the player releases the magic key, make all the "pointing" objects invisible again.

There are two downsides to this straightforward approach:

  • It really eats into your reservoir of objects, there can only be so many objects per room.
  • Defining all those "pointing" objects in every room will drive you nuts.

To avoid these issues, you could do "pointing" characters instead of "pointing" objects. But this still has the downside of cluttering the game with about 30 "pointing" characters, and you'd still need to tediously define about 30 "pointing" characters in the editor by hand for each game.

Is there another way to make this happen?

Cassiebsg

There are those who believe that life here began out there...

eri0o

I don't implement the rendering but you can get usable information for you handle the rendering in the Arrow Select module:

https://www.adventuregamestudio.co.uk/forums/index.php?topic=57379.0

fernewelten

Quote from: Cassiebsg on Mon 20/01/2020 21:55:18
Maybe this module is what you're looking for?

Seems to do the job, yes! (Albeit with non-animating pointers).

As far as I understand the code, it creates a transparent overlay dynamically, prints arrow icons at all appropriate positions onto the overlay, then shows the overlay. In that way, it avoids wasting a "pointing" object/character for each thing that needs to be pointed at.

Simple and elegant!

SMF spam blocked by CleanTalk