I want the computer AI to rebuild a base from the start at another location as soon as most of their base is destroyed. So I set these triggers:
(always):
run script at location X
(computer AI brings at least 3 buildings to anywhere):
set switch build
preserve trigger
(computer AI brings at most 2 buildings to anywhere)
(switch build is set):
run script at location Y
clear switch build
preserve trigger
But the computer AI doesnt build a new base at all (insane AI) or sometimes they do partly/completely (custom AI) but at the same location X, not at location Y. Probably because the first AI script keeps running? But it is possible to run more than 1 script, for example this runs ok:
(always):
run AI at location X
(always):
wait for 50000ms
run AI at location Y
(always):
wait for 10000ms
run AI at location Z
So how to have the computer properly rebuild a base from the start?
Post has been edited 2 time(s), last time on Feb 7 2010, 11:24 am by okeee.
None.
Idk* the answer to your question, but wouldn't the ai script at location Y stop when ever the computer has 3 buildings? So technically there will never be a completely built base at location Y
Post has been edited 2 time(s), last time on Feb 8 2010, 2:03 am by fat_flying_pigs.
None.
I forgot to mention a trigger..changed it.
None.
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
Instead of always running the first trigger run it only as long as the switch is cleared.
Also maybe giving away all his units and buildings for a second or so might be necessary to clear the old AI script.
2
melee AI scripts can generally not be run together as you can see.
Alternatively you could use two players of identical colour.
None.
Alternatively you could use two players of identical colour.
When giving all buildings to the other player? I can't do that, there is also the basic trigger that the computer player will be defeated when 0 buildings are destroyed.
using 2 insane AI scipts in this case was actually worse because there was hardly an attempt to rebuild the base. I'll check about the switch.
None.
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
Well how about disabling the defeat trigger when you're giving the buildings? -duh
I can't disable it, the computer player is supposed to be defeated this way. I just want to make it harder to be defeated.
None.
We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
Ever heard of that useful part of triggers called conditions? It helps you so that not every trigger has to be run all the time.
To be more specific:
Defeat: When computer player has at most 0 buildings
and switch x is cleared
-> defeat
Change base: When computer player has at most 3 buildings
and switch x is cleared
-> set switch x
-> give all buildings from computer to P9
-> wait for 2000ms *
-> give buildings back
-> Set new AI
-> clear switch.
* you have to play around with this value. Not sure how long it takes to clear the previous AI.