From 3fdbef83b644007d85522a97e7dadbb7260a9042 Mon Sep 17 00:00:00 2001 From: Il Jae Lee Date: Sun, 27 May 2018 22:09:07 -0400 Subject: [PATCH] Updated map generation scripts --- content/static_goal.acs | 16 ++++++++-------- content/static_goal_train.acs | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/content/static_goal.acs b/content/static_goal.acs index 3c5b9621..30afb28b 100644 --- a/content/static_goal.acs +++ b/content/static_goal.acs @@ -45,14 +45,14 @@ script 1 ENTER SetActorVelocity(0, 0, 0, 0, FALSE, FALSE); // Spawn goals - GOAL_LOC_ID = SPAWN_LOC_ID; - until(GOAL_LOC_ID!=SPAWN_LOC_ID) GOAL_LOC_ID = random(TARGET_ID_START, TARGET_ID_END); - if(IsTIDUsed(GOAL_TID)) Thing_Remove(GOAL_TID); - - until(SpawnSpot("TallRedColumn", GOAL_LOC_ID, GOAL_TID)); - goal_x = GetActorX(GOAL_LOC_ID); - goal_y = GetActorY(GOAL_LOC_ID); - goal_z = GetActorZ(GOAL_LOC_ID); + if(!IsTIDUsed(GOAL_TID)) { + GOAL_LOC_ID = SPAWN_LOC_ID; + until(GOAL_LOC_ID!=SPAWN_LOC_ID) GOAL_LOC_ID = random(TARGET_ID_START, TARGET_ID_END); + until(SpawnSpot("TallRedColumn", GOAL_LOC_ID, GOAL_TID)); + goal_x = GetActorX(GOAL_LOC_ID); + goal_y = GetActorY(GOAL_LOC_ID); + goal_z = GetActorZ(GOAL_LOC_ID); + } // Wait until(fdistance(0, GOAL_TID) < 64.0) diff --git a/content/static_goal_train.acs b/content/static_goal_train.acs index 5515398e..b146c004 100644 --- a/content/static_goal_train.acs +++ b/content/static_goal_train.acs @@ -47,14 +47,14 @@ script 1 ENTER SetActorVelocity(0, 0, 0, 0, FALSE, FALSE); // Spawn goals - GOAL_LOC_ID = SPAWN_LOC_ID; - until(GOAL_LOC_ID!=SPAWN_LOC_ID) GOAL_LOC_ID = random(TARGET_ID_START, TARGET_ID_END); - if(IsTIDUsed(GOAL_TID)) Thing_Remove(GOAL_TID); - - until(SpawnSpot("TallRedColumn", GOAL_LOC_ID, GOAL_TID)); - goal_x = GetActorX(GOAL_LOC_ID); - goal_y = GetActorY(GOAL_LOC_ID); - goal_z = GetActorZ(GOAL_LOC_ID); + if(!IsTIDUsed(GOAL_TID)) { + GOAL_LOC_ID = SPAWN_LOC_ID; + until(GOAL_LOC_ID!=SPAWN_LOC_ID) GOAL_LOC_ID = random(TARGET_ID_START, TARGET_ID_END); + until(SpawnSpot("TallRedColumn", GOAL_LOC_ID, GOAL_TID)); + goal_x = GetActorX(GOAL_LOC_ID); + goal_y = GetActorY(GOAL_LOC_ID); + goal_z = GetActorZ(GOAL_LOC_ID); + } // Spawn rewards int REWARD_LOC_ID = 0, REWARD_TID = 0;