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

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

Open
Mythbusters123 opened this issue Apr 5, 2023 · 2 comments
Open

Comments

@Mythbusters123
Copy link
Contributor

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.

@mat-1
Copy link
Collaborator

mat-1 commented Apr 5, 2023

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.

@Mythbusters123
Copy link
Contributor Author

Mythbusters123 commented Apr 5, 2023

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.

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

No branches or pull requests

2 participants