![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Knollewolle |
Good evening,
I’m trying to get into the Godot Engine by following the book “Godot Engine Game Development in 24 Hours” from Sams Teach Yourself by A. Manzur and G. Marques.
In Hour 5 there’s a sample project “Space Shooter” where several scenes are created. The root nodes are assigned to the scene’s group. So the “player” scene has a “player” group.
On the “asteroid” scene a script is applied in which is checked if the asteroid is colliding with the player or a lasershot:
func _on_asteroid_area_entered(area):
if area.is_in_group("shot") or area.is_in_group("player"):
Now, how do I add the groups of the other scenes? In the group manager the other groups don’t show up and if I try to add them manually, by typing their names and pressing add, only the asteroids nodes show.
Also, is “area” an in built constant or do I have to define it?
Like the Sprite-‘area’ of the “asteroid” scene/node is named “spr_asteroid”.
Did you preload the scene?
Asthmar | 2019-11-20 20:03