azalea icon indicating copy to clipboard operation
azalea copied to clipboard

`SwarmEvent` should have either a periodic or “tick” option.

Open Mythbusters123 opened this issue 1 year ago • 2 comments

Right now, the events that a bot swarm has consists of Login, Init, Disconnect, and Chat. However, there should also be an Interval or Tick event, for when you want to do something with the swarm (like add a new account) and not have to wait for an event like Chat or Disconnect to be triggered, but rather have a period event that will go off.

Mythbusters123 avatar Apr 05 '23 00:04 Mythbusters123

If you make a plugin you can add .in_schedule(CoreSchedule::FixedUpdate) to a system to make it run every tick (see https://github.com/mat-1/azalea/blob/main/azalea/src/pathfinder/mod.rs#L40)

You're right though, right now there is no way to do this without a plugin and there should be.

mat-1 avatar Apr 05 '23 01:04 mat-1

I think there should just be a period_interval_time(Duration) method in SwarmBuilder. Possibly also with a Tick event. I'd love to try and implement this, but I currently do not have substantial knowledge with the inner workings of this library.

Mythbusters123 avatar Apr 05 '23 22:04 Mythbusters123