You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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:
if "color" in properties:
Engine.is_editor_hint()
connect("is_area_entered", "_on_area_entered")
The old entities page needs removed:
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.
The text was updated successfully, but these errors were encountered: