//deathstar2battle_c state Base { Conditions { } Actions { ;SelectRandomSpline "splines=ai" ;CreateSplineCreatures "type=tiefighter" "use_selected_spline" "script=spline_tie" "x_offset=-1.5f" ;CreateSplineCreatures "type=tiefighter" "use_selected_spline" "script=spline_tie" "x_offset=1.5f" ;CreateSplineCreatures "type=tiefighter" "type=tieinterceptor" "use_selected_spline" "script=spline_tie" "y_offset=3.3f" ;SelectRandomSpline "splines=ai" ;CreateSplineCreatures "type=tiefighter" "use_selected_spline" "script=spline_tie" "x_offset=-1.5f" "distance=75" ;CreateSplineCreatures "type=tiefighter" "use_selected_spline" "script=spline_tie" "x_offset=1.5f" "distance=75" ;SelectRandomSpline "splines=ai" ;CreateSplineCreatures "type=tiefighter" "use_selected_spline" "script=spline_tie" "x_offset=-1.5f" "distance=150" ;CreateSplineCreatures "type=tiefighter" "use_selected_spline" "script=spline_tie" "x_offset=1.5f" "distance=150" ;CreateSplineCreatures "type=tiefighter" "type=tieinterceptor" "use_selected_spline" "script=spline_tie" "y_offset=3.3f" "distance=150" ;SelectRandomSpline "splines=ai" ;CreateSplineCreatures "type=tiefighter" "use_selected_spline" "script=spline_tie" "x_offset=-1.5f" "distance=225" ;CreateSplineCreatures "type=tiefighter" "use_selected_spline" "script=spline_tie" "x_offset=1.5f" "distance=225" ;CreateSplineCreatures "type=tiefighter" "type=tieinterceptor" "splines=tie_ai_b" "script=spline_tie" "distance=300" ;SelectRandomSpline "splines=ai" ;CreateSplineCreatures "type=tiefighter" "use_selected_spline" "script=spline_tie" "x_offset=-1.5f" "distance=375" ;CreateSplineCreatures "type=tiefighter" "use_selected_spline" "script=spline_tie" "x_offset=1.5f" "distance=375" ;CreateSplineCreatures "type=tiefighter" "type=tieinterceptor" "use_selected_spline" "script=spline_tie" "y_offset=3.3f" "distance=375" ;CreateSplineCreatures "type=tiefighter" "use_selected_spline" "script=spline_tie" "x_offset=-1.5f" "distance=450" ;CreateSplineCreatures "type=tiefighter" "use_selected_spline" "script=spline_tie" "x_offset=1.5f" "distance=450" SetState "Update" } } state Update { Conditions { //Think about spawning general spline followers. if Timer > 4 and if NumInSetAlive "1" < 10 goto SpawnOnSpline } Actions { ResetTimer "mintime=0" "maxtime=2" } } /////////// state SpawnOnSpline { Conditions { if Random < 0.5 goto Spawn_1 //if PreviousResult < 0.75 goto Spawn_2 if AlwaysTrue == 1 goto Spawn_back } Actions { } } state Spawn_1 { Conditions { } Actions { CreateSplineCreatures "type=tiefighter" "type=tieinterceptor" "splines=ai" "y_offset=-1.5f" "script=spline_tie" SetState "Update" } } state Spawn_back { Conditions { } Actions { CreateSplineCreatures "type=tiefighter" "type=tieinterceptor" "splines=ai" "script=spline_backward" "y_offset=1.5f" "distance=100" "relative_to_player" SetState "Update" } }