SpawnPosition
Goals
A scene you can place inside levels to mark possible enemy spawn point.
How it works
You need to place SpawnPosition
scenes inside of a Node2D named SpawnPositions
, inside the main YSort
for the level.
The Room.gd
script will identify these nodes and use them to spawn monsters in these starting positions. A SpawnPosition does not guarantee a monster will be spawned and it's also possible to spawn "nothing" according to the time of the day and area. This is normally decided by the WorldDirector
script.
But it is possible to bypass the WorldDirector
and force any Monster to be spawned using the SpawnPosition
exported properties:
Just use the inspector to find any monster's tscn file you want on the forced_enemy
property and that monster will be spawned in that spawn point. You can also use forced_direction
and forced_mood
to set the initial direction and mood of the monster, or leave them blank to use the monster's default.
This is specially useful for scripted scenes like the Deer tutorial.
With what script it communicates
Doesn't communicate with any other script, is expected by Room.gd