Nain57/Smart-AutoClicker

Add a new type of delay that affects only current Event

dJani97 opened this issue · 1 comments

The way delay is implemented, is that it delays the execution of all events in a scenario.

It would be great to have a delay that only delays actions is a particular events.

A gameplay example: I have ranged units, and also close range units. Ideally I would like to spawn close range units for about 10 seconds, and only deploy ranged ones once they have sufficient cover. With the current setup, if I delay the click action on the ranged units, it will also delay spawning close ranged units, even though their spawns are managed by different events in the scenario.

While i do understand your issue, applying the delay to the event only will lead to unexpected behaviours for the user, as it will be possible to execute another event while the previous one actions are not finished (so basically, to events performing actions at the same time)

But I think you can handle this use case differently by playing with event priorities and the enabled state. If I understand correctly your issue, you want to spawn ranged unit when you have enough close ranged unit. In that case:

-- Event List ---

  • Event 0 -> Conditions: "Enough Close Range". Actions: Disable Event 1 & Event 0, Enable Event 2
  • Event 1 -> Conditions: "Spawn Close Range Button". Actions: Click on condition
  • Event 2 -> Conditions: "Spawn Long Range Button". Actions: Click on condition

It is important to understand how the detection loops works when defining a scenario, here is the diagram provided in the wiki:

Just to let you know, v3 will add a new kind of events, working without image detection and allowing you to trigger actions based on timers, counters and even Android APIs broadcasts, stay tuned !