• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

AI using Transport Boats

Status
Not open for further replies.
Level 8
Joined
Nov 11, 2009
Messages
163
You need to order the transport ship to unload the units at target location.

If there are many transport boats then create a unit group by picking every unit of type transport boat and order picked unit to unload all at target point.
Otherwise you can create and store the ship to a variable and order it to unload.

The order you're looking for is under Unit - Issue Order Targeting A Point -> Unload All At.
 
Level 15
Joined
Feb 15, 2006
Messages
851
To the database record:

Boats with AI are the complete shit:

I've experimented with that for one month and gave up with that problem. The best solution is to have a triggered AI, no an *.ai file controlling the units.

The problem is the detection of stuck units, the load and unload orders in boats are very odd with ai, breaking the ai order sequence.

The second problem is the Ai buying boats because you can trigger the unit to do so, but the bought transport will try to move to the town hall and is very hard to change any order to it. AI will force an undesirable behavior on them.

So... in order to have any chance to get boats working we must do the following:

a trigger that trains units
a trigger that checks the amount of units trained and...
a trigger that manages the load unload order on units.

If you want to have the abilities managed by the AI, you can create a dummy ai.

[jass=dummy ai]function main takes nothing returns nothing
loop
call sleep(2)
endloop
endfunction[/code]

I hope it helps.
 
Level 15
Joined
Feb 15, 2006
Messages
851
If it's not a melee map then you can just create the units directly to the shore when the ship gets nearby and ignore the whole transport problem.
That's one possibility, but in general, and no matter what kind of map you develop, you can't use an *.ai script file to control ai players movement and attack, just the dummy ai to take advantage of the ability handling. Moving and ordering must be controlled via triggers including the load and unload in boats.
 
Level 8
Joined
Jun 21, 2009
Messages
325
@KuWe, well, it's more of altered melee but with campaign-ish elements, but I'd like the AI to rebuild destroyed boats in case one's lost. :p

@moyackx Hmm...well, I'm planning to use JASS AI, not an *.ai file, as that would take a lot of filesize from the map.
Also, about the script in your first post...mind describing me what it exactly does? Since I'm rather new with JASS.
 
Level 15
Joined
Feb 15, 2006
Messages
851
@moyackx Hmm...well, I'm planning to use JASS AI, not an *.ai file, as that would take a lot of filesize from the map.
Also, about the script in your first post...mind describing me what it exactly does? Since I'm rather new with JASS.
JASS AI = *.ai file

That function does an infinite loop which doesn't block the map (for the 2 seconds sleep), but "activates" indirectly in the specified player some basic ai related with the usage of abilities.
 
Level 8
Joined
Jun 21, 2009
Messages
325
Oh? By *.ai file, I thought you meant one made with the AI Editor, then imported into the map.

Though, do I need both the 3 triggers (one about AI training units, about checking the AI's force and issuing load/unload order to boats) and the Dummy AI? (well, except for the training units trigger, obviously, otherwise AI won't have any units.)
 
Level 8
Joined
Jun 21, 2009
Messages
325
Well, you're in the bottom right corner of the map, and there's a lake that extends from your base to the upper right corner of the map, where the AI's base is at.
The rest of the map is filled with other AIs which will constantly attack you with ground/air forces, but I want the upper right-corner AI to attack the player from the sea.
What's expected from AI should be training a ground force, putting it in transports, and sending it to the player's main base's shoreline. It will also back up its forces with Frigates/Juggernauts.

Edit: Eh, nevermind, this seems too complex to properly make. Is it simpler to do around the same with Zeppelins? AI seems to be able to use Zepps properly, as seen in melee and campaign...
 
Last edited:
Status
Not open for further replies.
Top