- Joined
- May 15, 2013
- Messages
- 3,782
Dear HIvers
I need help on a certain AI,
This AI was based on HumanEX Campaign 06, Orange Chaos Orcs. I've made edits to make it fit for my map,
problems is, it doesn't work. Well, not in the text itself I guess, let me explain:
The AI is turned on after an Intro Cinematic, by a Gameplay trigger which is run by an Intro Cleanup
-----
The AI remains passive for a while, it will train and build defenders, but this part doesn't work. On the other hand, if the player user attacks its units, then a command is sent to the AI to be aggressive, and it will attack, sadly, it doesn't work as well, propably.
-----
Now this wierd thing happens, once I attacked the AI, I let it survive. Then I go on to an Optional Cine,
then after that, I checked the AI player, it was training units and replacing those who died, it also trains
a Thug, but only one (See the AI, it was suppose to train 7).
I checked the Cinematic triggers, but I don't see anything that relates to the AI, not Pause All Units, not Hides, nor any other.
What is happening to this AI? Is it from the map or from itself?
Also, since I'm a little sucky on AI's, I need someone to make AI's for me, or check my p... and
find triggers or functions relating to AI's and fix it as well as my own-made or edited AI. If anyone's interested, PM me.
- Edge45
I need help on a certain AI,
JASS:
//==================================================================================================
globals
player user = Player(2)
constant integer A_THUG = 'h60G' // Thug
constant integer A_ROGUE = 'n600' // Rogue
constant integer A_ASSASSIN = 'n601' // Assassin
constant integer A_WIZARD = 'h600' // Wizard
constant integer A_SHADOWPRIEST = 'n602' // Shadowpriest
constant integer A_TENT = 'h60A' // Tent
endglobals
//--------------------------------------------------------------------------------------------------
// main
//--------------------------------------------------------------------------------------------------
function main takes nothing returns nothing
call CampaignAI(HOUSE,null)
call SetReplacements(1,1,2)
call SetSlowChopping(true)
set campaign_wood_peons = 3
call SetBuildUnitEx ( 7,7,7, A_THUG )
call CampaignDefenderEx( 2,2,2, A_ROGUE )
call CampaignDefenderEx( 1,1,2, A_ASSASSIN )
call CampaignDefenderEx( 0,1,1, A_WIZARD )
call CampaignDefenderEx( 0,0,2, A_SHADOWPRIEST )
call SetBuildUpgrEx( 0,1,1, UPG_ORC_ARMOR )
call SetBuildUpgrEx( 0,1,1, UPG_ORC_MELEE )
call SetBuildUpgrEx( 0,1,1, UPG_ORC_RANGED )
call SetBuildUpgrEx( 0,0,1, UPG_ORC_VENOM )
call WaitForSignal()
//*** WAVE 1 ***
call InitAssaultGroup()
call CampaignAttackerEx( 2,2,3, A_ROGUE )
call CampaignAttackerEx( 2,2,2, A_ASSASSIN )
call SuicideOnPlayerEx(M3,M3,M3,user)
loop
//*** WAVE 2+ ***
call InitAssaultGroup()
call CampaignAttackerEx( 2,2,3, A_ROGUE )
call CampaignAttackerEx( 1,1,2, A_ASSASSIN )
call CampaignAttackerEx( 1,1,1, A_WIZARD )
call SuicideOnPlayerEx(M5,M5,M4,user)
call InitAssaultGroup()
call CampaignAttackerEx( 2,2,3, A_ROGUE )
call CampaignAttackerEx( 1,1,2, A_SHADOWPRIEST )
call CampaignAttackerEx( 2,2,2, A_WIZARD )
call SuicideOnPlayerEx(M5,M5,M4,user)
call InitAssaultGroup()
call CampaignAttackerEx( 3,3,3, A_ASSASSIN )
call CampaignAttackerEx( 2,2,2, A_ROGUE )
call CampaignAttackerEx( 0,1,2, A_WIZARD )
call SuicideOnPlayerEx(M5,M5,M4,user)
endloop
endfunction
//==================================================================================================
This AI was based on HumanEX Campaign 06, Orange Chaos Orcs. I've made edits to make it fit for my map,
problems is, it doesn't work. Well, not in the text itself I guess, let me explain:
The AI is turned on after an Intro Cinematic, by a Gameplay trigger which is run by an Intro Cleanup
-----
-
Alterac AI
-
Events
-
Conditions
-
Actions
-
AI - Start campaign AI script for P_ConfederacyOrange: KaWx1 Orange.ai
-
-
The AI remains passive for a while, it will train and build defenders, but this part doesn't work. On the other hand, if the player user attacks its units, then a command is sent to the AI to be aggressive, and it will attack, sadly, it doesn't work as well, propably.
-----
-
Alterac Base Orange
-
Events
-
Unit - A unit Is attacked
-
-
Conditions
-
(Owner of (Attacked unit)) Equal to P_ConfederacyOrange
-
(Owner of (Attacking unit)) Equal to P_PlayerBlue
-
GameOver Equal to False
-
-
Actions
-
Trigger - Turn off (This trigger)
-
-------- Start AI --------
-
Trigger - Run Orange AI Command <gen> (checking conditions)
-
-
-
Orange AI Command
-
Events
-
Conditions
-
Actions
-
-------- Send Command --------
-
AI - Send P_ConfederacyOrange the AI Command (0, 0)
-
-
Now this wierd thing happens, once I attacked the AI, I let it survive. Then I go on to an Optional Cine,
then after that, I checked the AI player, it was training units and replacing those who died, it also trains
a Thug, but only one (See the AI, it was suppose to train 7).
I checked the Cinematic triggers, but I don't see anything that relates to the AI, not Pause All Units, not Hides, nor any other.
What is happening to this AI? Is it from the map or from itself?
Also, since I'm a little sucky on AI's, I need someone to make AI's for me, or check my p... and
find triggers or functions relating to AI's and fix it as well as my own-made or edited AI. If anyone's interested, PM me.
- Edge45