Kling[o]
New Member
- Reaction score
- 7
I'm starting learning Jass and I wanted to know if there's a website or anything that show all Jass function?
<- Outdated.Jass Shop Pro
Or use the nifty wiki.
that's kindof interesting but i'm uncertain why you posted it.
Laiev which mpq file are you talking about?
//============================================================================
// Human 02 -- red player -- AI Script
//============================================================================
globals
player user = Player(1)
endglobals
//============================================================================
// main
//============================================================================
function main takes nothing returns nothing
call CampaignAI(PIG_FARM,null)
call SetReplacements(0,1,3)
call CampaignDefenderEx( 1,1,1, HEAD_HUNTER )
call CampaignDefenderEx( 1,1,2, GRUNT )
call CampaignDefenderEx( 0,0,1, RAIDER )
//*** WAVE 1 ***
call InitAssaultGroup()
call CampaignAttackerEx( 2,2,2, GRUNT )
call CampaignAttackerEx( 1,1,2, HEAD_HUNTER )
call SuicideOnPlayer(M2,user)
//*** WAVE 2 ***
call InitAssaultGroup()
call CampaignAttackerEx( 2,2,2, GRUNT )
call CampaignAttackerEx( 2,2,3, HEAD_HUNTER )
call SuicideOnPlayer(M2,user)
//*** WAVE 3 ***
call InitAssaultGroup()
call CampaignAttackerEx( 4,4,4, GRUNT )
call CampaignAttackerEx( 0,0,2, RAIDER )
call CampaignAttackerEx( 1,1,1, HEAD_HUNTER )
call SuicideOnPlayer(M3,user)
//*** WAVE 4 ***
call InitAssaultGroup()
call CampaignAttackerEx( 3,3,3, GRUNT )
call CampaignAttackerEx( 1,1,3, HEAD_HUNTER )
call SuicideOnPlayer(M2,user)
loop
//*** WAVE 5 ***
call InitAssaultGroup()
call CampaignAttackerEx( 1,1,3, GRUNT )
call CampaignAttackerEx( 0,0,2, RAIDER )
call CampaignAttackerEx( 4,4,4, HEAD_HUNTER )
call SuicideOnPlayer(M3,user)
//*** WAVE 6 ***
call InitAssaultGroup()
call CampaignAttackerEx( 4,4,5, GRUNT )
call CampaignAttackerEx( 1,1,2, HEAD_HUNTER )
call SuicideOnPlayer(M3,user)
//*** WAVE 7 ***
call InitAssaultGroup()
call CampaignAttackerEx( 2,2,3, GRUNT )
call CampaignAttackerEx( 0,0,2, RAIDER )
call CampaignAttackerEx( 3,3,4, HEAD_HUNTER )
call SuicideOnPlayer(M4,user)
endloop
endfunction
The global variable is just changing [LJASS]Player(0)[/LJASS] to user so you don't need to keep calling [LJASS]Player[/LJASS].
If you wanted to make your own scripts like this, you could put them in a textfile named [LJASS]"MyAI.txt"[/LJASS] and put them in your JassHelper folder, then put [LJASS]//! import "MyAI.txt"[/LJASS] in your map header.
Or you could just code right in your editor.
What don't you understand about it? It's just a normal function called on Map Init. Of course it looks like gibberish with the weird Blizzard JASS everywhere, but blame that on blizzard for not giving documentation on the AI.
The only way to decipher it is to test all those functions yourself in game.