- Joined
- Oct 11, 2020
- Messages
- 40
Detached Tales: The Convict
So I tried doing a wave system for my campaign:
Here are my units:
BUILDINGS:
1 GREAT HALL (o60B)
1 GRIM BARRACKS (o607)
1 HORNED BARRACKS (o608)
4 PIG FARMS (o609)
1 ANSCESTRAL LODGE (o60C)
1 WARFORGE (o60F)
WORKERS:
2 LUMBER TAUREN WORKER (o60I)
3 GOLD TAUREN WORKER (o60I)
BASE DEFENDERS:
1 TAUREN WHISPERER (o602)
1 TAUREN WARCALLER (o604)
2 TAUREN BRUTE (n60K)
2 WARCLAN BRUTE (o60K)
1 WARCLAN SPEARTHROWER (n60M)
My AI attempt:
It runs, trains the attack groups, but for some reason the game closes or crashes without error whenever it's suppose to go to the player to suicide. I've been stressing over this the whole day. Also, it doesn't recognize lumber gatherers and selects all workers to go on gold. I'm really greatful if anyone would care to help me, basically this whole outpost is preplaced, i just want the AI to train and do wave attacks and have base defenders. I did a outline on how I want it to work:
WAVES LOOPS:
WAVE 1: 3 WARCLAN BRUTE, 1 TAUREN BRUTE, 1 WARCLAN SPEARTHROWER
WAVE 2: 2 WARCLAN BRUTE, 1 TAUREN BRUTE, 1 WARCLAN SPEARTHROWER, 1 TAUREN WHISPERER
WAVE 3: 4 WARCLAN BRUTE, 1 TAUREN WARCALLER
WAVE 4: 2 WARCLAN BRUTE, 2 TAUREN BRUTE, 1 WARCLAN SPEARTHROWER
and I tried implementing this with the code I set up, but no matter what, i can't figure out why it's closing the game.
Here are my units:
BUILDINGS:
1 GREAT HALL (o60B)
1 GRIM BARRACKS (o607)
1 HORNED BARRACKS (o608)
4 PIG FARMS (o609)
1 ANSCESTRAL LODGE (o60C)
1 WARFORGE (o60F)
WORKERS:
2 LUMBER TAUREN WORKER (o60I)
3 GOLD TAUREN WORKER (o60I)
BASE DEFENDERS:
1 TAUREN WHISPERER (o602)
1 TAUREN WARCALLER (o604)
2 TAUREN BRUTE (n60K)
2 WARCLAN BRUTE (o60K)
1 WARCLAN SPEARTHROWER (n60M)
My AI attempt:
JASS:
//============================================================================
// MULH'ARAS OUTPOST (YELLOW) -- AI Script
//============================================================================
globals
player user = PlayerEx(1) // Player is blue
endglobals
//============================================================================
// main
//============================================================================
function main takes nothing returns nothing
//====================================================
// INITIAL SETUP
//====================================================
call CampaignAI(HOUSE, null)
call SetReplacements(1,1,3)
//----------------------------------------------------
// BUILD ORDER
//----------------------------------------------------
call SetBuildUnitEx(1,1,1,'o60B') // Great Hall
call SetBuildUnitEx(1,1,1,'o607') // Grim Barracks
call SetBuildUnitEx(1,1,1,'o608') // Horned Barracks
call SetBuildUnitEx(4,4,4,'o609') // Pig Farms
call SetBuildUnitEx(1,1,1,'o60C') // Ancestral Lodge
call SetBuildUnitEx(1,1,1,'o60F') // Warforge
//----------------------------------------------------
// WORKERS
//----------------------------------------------------
call SetBuildUnitEx(2,2,2,'o60I') // Lumber Tauren Worker
call SetBuildUnitEx(3,3,3,'o60I') // Gold Tauren Worker
//----------------------------------------------------
// BASE DEFENDERS
//----------------------------------------------------
call CampaignDefenderEx(1,1,1,'o602') // Tauren Whisperer
call CampaignDefenderEx(1,1,1,'o604') // Tauren Warcaller
call CampaignDefenderEx(2,2,2,'n60K') // Tauren Brute
call CampaignDefenderEx(2,2,2,'o60K') // Warclan Brute
call CampaignDefenderEx(1,1,1,'n60M') // Warclan Spearthrower
//----------------------------------------------------
call WaitForSignal()
//====================================================
// INITIAL WAVES
//====================================================
// *** WAVE 1 ***
call InitAssaultGroup()
call CampaignAttackerEx(3,3,3,'o60K') // Warclan Brute
call CampaignAttackerEx(1,1,1,'n60K') // Tauren Brute
call SuicideOnPlayerEx(M1,M1,M1,user)
// *** WAVE 2 ***
call InitAssaultGroup()
call CampaignAttackerEx(2,2,2,'o60K') // Warclan Brute
call CampaignAttackerEx(2,2,2,'n60K') // Tauren Brute
call CampaignAttackerEx(1,1,1,'n60M') // Warclan Spearthrower
call SuicideOnPlayerEx(M2,M2,M2,user)
// *** WAVE 3 ***
call InitAssaultGroup()
call CampaignAttackerEx(2,2,2,'o60K') // Warclan Brute
call CampaignAttackerEx(2,2,2,'n60M') // Warclan Spearthrower
call CampaignAttackerEx(1,1,1,'n60K') // Tauren Brute
call SuicideOnPlayerEx(M2,M2,M2,user)
//====================================================
// LOOPING WAVES
//====================================================
loop
// *** WAVE 1 LOOP ***
call InitAssaultGroup()
call CampaignAttackerEx(3,3,3,'o60K')
call CampaignAttackerEx(1,1,1,'n60K')
call CampaignAttackerEx(1,1,1,'n60M')
call SuicideOnPlayerEx(M2,M2,M2,user)
// *** WAVE 2 LOOP ***
call InitAssaultGroup()
call CampaignAttackerEx(2,2,2,'o60K')
call CampaignAttackerEx(1,1,1,'n60K')
call CampaignAttackerEx(1,1,1,'n60M')
call CampaignAttackerEx(1,1,1,'o602')
call SuicideOnPlayerEx(M2,M2,M2,user)
// *** WAVE 3 LOOP ***
call InitAssaultGroup()
call CampaignAttackerEx(4,4,4,'o60K')
call CampaignAttackerEx(1,1,1,'o604')
call SuicideOnPlayerEx(M2,M2,M2,user)
// *** WAVE 4 LOOP ***
call InitAssaultGroup()
call CampaignAttackerEx(2,2,2,'o60K')
call CampaignAttackerEx(2,2,2,'n60K')
call CampaignAttackerEx(1,1,1,'n60M')
call SuicideOnPlayerEx(M2,M2,M2,user)
endloop
endfunction
It runs, trains the attack groups, but for some reason the game closes or crashes without error whenever it's suppose to go to the player to suicide. I've been stressing over this the whole day. Also, it doesn't recognize lumber gatherers and selects all workers to go on gold. I'm really greatful if anyone would care to help me, basically this whole outpost is preplaced, i just want the AI to train and do wave attacks and have base defenders. I did a outline on how I want it to work:
WAVES LOOPS:
WAVE 1: 3 WARCLAN BRUTE, 1 TAUREN BRUTE, 1 WARCLAN SPEARTHROWER
WAVE 2: 2 WARCLAN BRUTE, 1 TAUREN BRUTE, 1 WARCLAN SPEARTHROWER, 1 TAUREN WHISPERER
WAVE 3: 4 WARCLAN BRUTE, 1 TAUREN WARCALLER
WAVE 4: 2 WARCLAN BRUTE, 2 TAUREN BRUTE, 1 WARCLAN SPEARTHROWER
and I tried implementing this with the code I set up, but no matter what, i can't figure out why it's closing the game.

