Goto MAI test scenario: move ghost removal into turn end event

This prevents the E_NOT_REACHED_DESTINATION errors that happen if this
is done in a moveto event.
This commit is contained in:
mattsc 2013-07-06 18:13:32 -07:00
parent 1c27a6d1cc
commit 874eb7cafd

View file

@ -485,7 +485,7 @@ Note: This is a demonstration of how the Goto Micro AI can be used to code guard
[event]
name=side 8 turn
first_time_only= no
first_time_only=no
{RANDOM 0..99}
[if]
@ -504,17 +504,26 @@ Note: This is a demonstration of how the Goto Micro AI can be used to code guard
{CLEAR_VARIABLE random}
[/event]
# Remove ghosts that have made it all the way south
[event]
name=moveto
first_time_only= no
[filter]
side=8
y=33
[/filter]
name=side 8 turn end
first_time_only=no
[kill]
id=$unit.id
[/kill]
[store_unit]
[filter]
side=8
y=33
[/filter]
variable=stored_ghosts
[/store_unit]
{FOREACH stored_ghosts i_g}
[kill]
id=$stored_ghosts[$i_g].id
[/kill]
{NEXT i_g}
{CLEAR_VARIABLE stored_ghosts}
[/event]
[/event]