Only choose spawn locations that are on-board (not border) locations.
Otherwise the spawning will fail.
This commit is contained in:
parent
82b26cf7fe
commit
3a65fbd2c8
1 changed files with 11 additions and 3 deletions
|
@ -32,13 +32,21 @@ Note: You need to use the default map settings for the scenario to work right."
|
|||
{RANDOMIZE $location}
|
||||
[store_locations]
|
||||
variable=locs
|
||||
x=$spawn_place[$random].x
|
||||
y=$spawn_place[$random].y
|
||||
radius=1
|
||||
[and]
|
||||
x=$spawn_place[$random].x
|
||||
y=$spawn_place[$random].y
|
||||
radius=1
|
||||
[/and]
|
||||
# Avoid border hexes; we cannot spawn there.
|
||||
[and]
|
||||
x=1-16
|
||||
y=8-22
|
||||
[/and]
|
||||
[/store_locations]
|
||||
{RANDOMIZE_INDEX $locs.length}
|
||||
{VARIABLE spawn_x $locs[$random].x}
|
||||
{VARIABLE spawn_y $locs[$random].y}
|
||||
{CLEAR_VARIABLE locs}
|
||||
[/then]
|
||||
[/if]
|
||||
[store_unit]
|
||||
|
|
Loading…
Add table
Reference in a new issue