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

Inquiry: spawn_at despawn existing or fail #3

Closed
ten3roberts opened this issue Oct 5, 2022 · 0 comments
Closed

Inquiry: spawn_at despawn existing or fail #3

ten3roberts opened this issue Oct 5, 2022 · 0 comments

Comments

@ten3roberts
Copy link
Owner

What are your opinions for spawn_at and similar functions: should the fail if an entity with the same entity already exists or should they despawn the previous one.

E.g; spawn_at(2v4) will despawn 2v3 if it exists.

Having it despawn makes the api simpler as they don't have to return a result. However, it may cause bugs where other important entities are despawned unintentionally.

There is a reserve entity id feature which allows you to spawn blank entities and override them spawn_at without first having to despawn the placeholder, as you would need to if you spawned a normal entities with no components.

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

1 participant