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

I'm intrigued, but how is this better than groups? #1

Open
spiderbyte87 opened this issue May 27, 2024 · 2 comments
Open

I'm intrigued, but how is this better than groups? #1

spiderbyte87 opened this issue May 27, 2024 · 2 comments

Comments

@spiderbyte87
Copy link

I use groups heavily in my game so this is very interesting to me.

I don't mean to sound negative, I'm just struggling to understand how this replaces or enhances groups. Can you explain in more detail what the use-cases for this are?

@OctoD
Copy link
Owner

OctoD commented May 28, 2024

They are similar, but different. Let's say you have many groups which handle different enemies.

An example (like a rts or a arpg)

Each enemy is grouped as enemy_ranged, enemy_melee, enemy_static, enemy_epic and so on.

In this way, to gather all grouped nodes under enemy you would either tag all those nodes adding an extra group enemy and then by filtering the results or using a tagging system you would end up by having these tags

  • enemy.ranged
  • enemy.melee
  • enemy.static
  • enemy.epic

You can then, in gdscript, do something like this (note, this method is not in the release yet, will update soon):

func get_enemies() -> Array[Node]:
    return TagManager.get_nodes_in_tag_path(self, "enemy")

You can also browse the new example in the demo. Thank you!

@OctoD
Copy link
Owner

OctoD commented Jun 8, 2024

Added: you can now edit the tags as a csv and drag n drop these files directly in godot and have them converted to resources ready to be used by the editor tag tools

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