• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Help me with ai! Please!

Status
Not open for further replies.
Level 2
Joined
Nov 28, 2012
Messages
6
Computer AI didn't do anything!

Hey guys! I'm new to AI and this is my first post! :ogre_haosis:

Well, i'm just into map making and i like it. I learn and learn but i can't do AI. I already try to make AI from the AI editor and tested my map. But the computer didn't build anything from the AI i build. Instead it keep gathering gold. Help please. If i never learn this then i never can do it. :vw_sad:

(PS : I already search for the AI problem around the net but none of it help!)

And sorry for my bad english! I'm a malaysian. XD

peace!
 
Last edited:
Level 2
Joined
Nov 28, 2012
Messages
6
Please i'm desperate. I'm using JassCraft to make the AI.
It's a naga AI design for naga computer. Below is the Jass AI Code!

JASS:
      globals
  player MyVictim = Player(0)
  endglobals
  
  function ConfigureAI takes nothing returns nothing
  call SetSlowChopping( false )
  endfunction
  
function main takes nothing returns nothing
call CampaignAI( CORAL_BED, function hero_levels )
call ConfigureAI( )

call SetReplacements( 1, 2, 3 )
call SetBuildUnitEx( 1, 1, 1, TEMPLE_TIDES )
call SetBuildUnit( 15, MURGUL_SLAVES )
call SetBuildUnitEx( 1, 2, 3, CORAL_BED )
call SetBuildUnitEx( 1, 2, 2, SPAWNING_GROUND )
call SetBuildUnit( 1, NAGA_ALTAR )
call CampaignDefenderEx( 3, 4, 4, SNAP_DRAGON ) 
call CampaignDefenderEx( 2, 4, 5, NAGA_MYRMIDON )
call SetBuildUnitEx( 2, 4, 6, TIDAL_GUARDIAN )
call SetBuildUnit( 1, SHRINE_AZSHARA )
call CampaignDefenderEx( 3, 4, 4, NAGA_SIREN ) 
loop
call SetBuildUnit( 2, 4, 4, NAGA_SIREN )
call SetBuildUnit( 2, 4, 4, NAGA_MYRMIDON )
call SetBuildUnit( 3, 4, 4, SNAP_DRAGON ) 
call SetBuildUnit( 2, 4, 4, NAGA_COUATI )
endloop
endfunction

call InitAssaultGroup()
call CampaignAttackerEx( 3, 4, 4, NAGA_SIREN )
call CampaignAttackerEx( 1, 1, 2, NAGA_MYRMIDON )  
call SuicideOnPlayerEx( M5, M5, M5, MyVictim )

call CampaignAttackerEx( 3, 4, 4, NAGA_SIREN )
call CampaignAttackerEx( 2, 2, 4, NAGA_MYRMIDON )  
call CampaignAttackerEx( 1, 1, 2, NAGA_COUATI ) 
call SuicideOnPlayerEx( M5, M5, M5, MyVictim )

call CampaignAttackerEx( 5, 6, 6, NAGA_SIREN )
call CampaignAttackerEx( 3, 3, 5, NAGA_MYRMIDON )  
call CampaignAttackerEx( 1, 1, 2, NAGA_COUATI ) 
call SuicideOnPlayerEx( M5, M5, M5, MyVictim )

Can someone please help me with this?
 
Level 2
Joined
Nov 28, 2012
Messages
6
Well. Ty for the reply!
It is an .ai so i could not import the ai for the AI editor can only import .wai file.
I use trigger to execute the ai. But it still not working. The computer just gather gold. The computer didn't harvest lumber too even though the tree is near to townhall.

(PS : Is there any wrong with the Jass code?)

Anymore suggestion?
Thanks
 
Level 2
Joined
Nov 28, 2012
Messages
6
Ok. I know this kind of hard. But i really need to learn about AI thing.
Can someone tell me how to run the AI on computer player?

(I already imported the AI)
Thanks!
 
Status
Not open for further replies.
Top