HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Questions about .ai scripts

02-14-2010, 11:39 PM#1
Axarion
Hi people on WC3c :)

I have some questions and I would be happy if someone could help me. I am working on a custom .ai script exported from an .wai. I have some problems with getting tavern heroes for my race :(

It would be really nice if someone could say me how to use tavern heroes in the .ai (without AMAI, but I'm posting this here because the people here know the most about .ai)

~ Axarion
02-17-2010, 05:39 PM#2
AIAndy
Iirc that requires you to order a unit manually to the tavern and then order it to buy that hero.
02-18-2010, 01:33 PM#3
Imbapiranha
Quote:
Originally Posted by AIAndy
Iirc that requires you to order a unit manually to the tavern and then order it to buy that hero.
lirc? :P
Well that question has been mainly done by me. I sent my whole army to that point, single units and so on, tryting to pick the tavern hero again and again, using
Collapse JASS:
native IssueNeutralImmediateOrder       takes player forWhichPlayer, unit neutralStructure, string unitToBuild returns boolean
Using simple triggers for this DID work in a testmap, but the AI script seemingly did not execute that action.
I even took out all conditions, stopped the AI's building queue, sent the army to the tavern and looped that command every second again and again. The AI had its resources and food to pick the hero, but simply ignored the command.
In my opinion Blizzard stops all commands in AI scripts that do not command the AI player's units.
I know that the AMAI uses neutral heroes, but since it is highly trigger enhanced, I doubt that this hero picking has been done in the AI script.
02-19-2010, 07:59 AM#4
AIAndy
Quote:
Originally Posted by Imbapiranha
lirc? :P
It has been years since I looked at that so things might have changed or my memory might be faulty.
Quote:
Well that question has been mainly done by me. I sent my whole army to that point, single units and so on, tryting to pick the tavern hero again and again, using
Collapse JASS:
native IssueNeutralImmediateOrder       takes player forWhichPlayer, unit neutralStructure, string unitToBuild returns boolean
Using simple triggers for this DID work in a testmap, but the AI script seemingly did not execute that action.
I even took out all conditions, stopped the AI's building queue, sent the army to the tavern and looped that command every second again and again. The AI had its resources and food to pick the hero, but simply ignored the command.
In my opinion Blizzard stops all commands in AI scripts that do not command the AI player's units.
I know that the AMAI uses neutral heroes, but since it is highly trigger enhanced, I doubt that this hero picking has been done in the AI script.
AMAI is not trigger enhanced itself. Only the UI for controlling the AI as ally is done in trigger space.

Use the ById variant of that native. Any non AI native that takes or returns a string does not work properly in AI scripts because the natives look in the wrong string table.
03-23-2010, 02:22 PM#5
FYAN
AIANDY i absolutly agree