Anyone know a good tutorial that teaches the basics of AI?
WorldEdit has an AI feature, but I don't think that it can handle two different "jobs". There are inner TDers and Outer Meleers.
I tried to make an AI trigger that basically sais that the Inner CP should build the best towers it can make, to a max of 20 towers. after that limit is reached start upgrading. I know its not the best strategy for a TD but so far it's not showing any sign of running.
Sorry about that last line. It's all deciding what tower to build.
WorldEdit has an AI feature, but I don't think that it can handle two different "jobs". There are inner TDers and Outer Meleers.
I tried to make an AI trigger that basically sais that the Inner CP should build the best towers it can make, to a max of 20 towers. after that limit is reached start upgrading. I know its not the best strategy for a TD but so far it's not showing any sign of running.
Code:
Test Red Ingame
Events
Time - Every 10.00 seconds of game time
Conditions
Actions
If ((Player 1 (Red) slot status) Equal to Has left the game) then do (Trigger - Turn on Red Al <gen>) else do (Do nothing)
If ((Player 1 (Red) slot status) Equal to Is unused) then do (Trigger - Turn on Red Al <gen>) else do (Do nothing)
Code:
Red Al
Events
Time - Every 1.00 seconds of game time
Conditions
(Inner Builder 0003 <gen> is paused) Equal to True
Actions
Trigger - Turn off Test Red Ingame <gen>
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Count structures controlled by Player 1 (Red) (Include incomplete structures)) Greater than or equal to 20
(Player 1 (Red) Current gold) Greater than or equal to 30
Then - Actions
For each (Integer A) from 1 to ((Player 1 (Red) Current gold) / 30), do (Actions)
Loop - Actions
Unit Group - Pick every unit in (Units owned by Player 1 (Red) of type Arrow Tower) and do (Actions)
Loop - Actions
Unit - Replace (Picked unit) with a Spear Tower using The old unit's relative life and mana
Else - Actions
If ((Player 1 (Red) Current gold) Greater than or equal to 10) then do (If ((Player 1 (Red) Current gold) Less than 30) then do (Unit - Order Inner Builder 0003 <gen> to build a Arrow Tower at (Random point in Inner <gen>)) else do (If (((Player 1 (Red) Current gold) Greater than or equal to 30) and ((Player 1 (Red) Current gold else do (Do nothing)
Sorry about that last line. It's all deciding what tower to build.