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

Add Page for using GDScript with Entities #6

Open
6 of 10 tasks
DeerTears opened this issue Jan 26, 2023 · 0 comments
Open
6 of 10 tasks

Add Page for using GDScript with Entities #6

DeerTears opened this issue Jan 26, 2023 · 0 comments

Comments

@DeerTears
Copy link
Member

DeerTears commented Jan 26, 2023

This page should include how to add scripts that interface with entities.

Right now this is lumped into the "entities" page, I will separate this out.

This page will include:

  • A general template for new entity scripts
  • Attaching the script to the entity definition
  • A link to new pages on updating the FGD and CFG
  • Code safety to retrieve trenchbroom-set values: if "color" in properties:
  • Code safety with entities (if entity is SpawnPoint: entity.spawn("enemy"))
  • Separating in-editor behaviour from in-game behaviour: Engine.is_editor_hint()
  • Adding and finding entities by group: `func _ready(): add_to_group("SpawnPoints") get_tree().get_nodes_in_group("SpawnPoints")
  • Connecting Area and Body signals at runtime with code: connect("is_area_entered", "_on_area_entered")
  • Creating child nodes in code (as an alternative to using .tscn files for more complex node setups)

The old entities page needs removed:

  • Writing code for entities

Going forward it'd be nice to group entity stuff into subpages, and split up the big entities page into smaller chunks, similar to the Beginner's Guide to Qodot.

All suggestions (additions, removals, reworkings) are welcome.

DeerTears added a commit that referenced this issue Jan 26, 2023
Taking the reigns on #6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant