Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Automatically path to the nearest hint arrow #115

Open
Infinitay opened this issue Nov 8, 2024 · 5 comments
Open

[Feature] Automatically path to the nearest hint arrow #115

Infinitay opened this issue Nov 8, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@Infinitay
Copy link

Infinitay commented Nov 8, 2024

Could you please add the option to automatically path to the nearest available hint arrow?

image

@Infinitay Infinitay added the enhancement New feature or request label Nov 8, 2024
@Skretzo
Copy link
Owner

Skretzo commented Nov 8, 2024

Is that a hint arrow created by a plugin or by the game?

@Infinitay
Copy link
Author

Is that a hint arrow created by a plugin or by the game?

Plugin in this case. Although both would be nice. I wasn't aware support for hint arrows depended on the origin of it.

@Skretzo
Copy link
Owner

Skretzo commented Nov 8, 2024

I'm not sure there is an event to subscribe to when a hint arrow has been added, which makes this much harder. I would rather not check every tick whether a hint arrow has been added. I also don't want to recreate plugin logic to determine when a hint arrow appears, e.g. implementing part of a clue plugin to know when a hint arrow pops up. Therefore, a feature like this will require the plugin that creates the hint arrow to post a custom event to indicate that a hint arrow has been added, or have that plugin instead request a path from shortest path via the plugin message event.

@Infinitay
Copy link
Author

  1. Would it be necessarily bad (expensive) to query to see if there' a hint arrow every tick? Although avoiding it isn't a bad idea
  2. Yea there's no event for it, but would it be fired by another event such as widgetloaded or maybe even a projectile/graphics? Not sure
  3. If there is still no event for it, perhaps Adam or Polar from Discord can help with a known cs2 id that is fired and we can use ScriptPostFired

My one concern is that if using gametick to fetch the hintarrow from the client will work better as it could be defined earlier as opposed to another event where it could require you to be closer to the vicinity of the hintarrow (eg. if hintarrow does fire WidgetLoaded, then we'd need to be near it so that it would appear in the first place on the chance that gametick would allow us to get the hintarrow at any point it is defined)

@Skretzo
Copy link
Owner

Skretzo commented Nov 8, 2024

  1. I'm not too worried about it being expensive, but rather that the shortest path plugin will gradually have quite a bit of non-pathfinding logic mixed in-between pathfinding logic. I don't mind it if it is a separate event, e.g. PluginMessage, but the game tick event is used by pathfinding.
  2. The client has client.getHintArrowPoint(), client.getHintArrowPlayer() and client.getHintArrowNpc() which can be checked every game tick, but I would rather that a separate plugin is doing this logic and requesting a path from the shortest path plugin. I agree that using the game tick event is better than e.g. WidgetLoaded or looking at projectiles/graphics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants