Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: rebuild base at another location
rebuild base at another location
Feb 7 2010, 9:13 am
By: okeee  

Feb 7 2010, 9:13 am okeee Post #1



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:

Quote
(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:
Quote
(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.

Feb 7 2010, 9:33 am fat_flying_pigs Post #2



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.

Feb 7 2010, 11:26 am okeee Post #3



I forgot to mention a trigger..changed it.



None.

Feb 7 2010, 12:37 pm NudeRaider Post #4

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.




Feb 7 2010, 2:20 pm Vi3t-X Post #5



Alternatively you could use two players of identical colour. :P



None.

Feb 7 2010, 10:40 pm okeee Post #6



Quote from Vi3t-X
Alternatively you could use two players of identical colour. :P
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.

Feb 8 2010, 12:37 am NudeRaider Post #7

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




Feb 8 2010, 9:28 am okeee Post #8



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.

Feb 8 2010, 9:43 am NudeRaider Post #9

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.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[04:05 am]
O)FaRTy1billion[MM] -- the setting exists, it's just hidden in a weird place
[04:04 am]
O)FaRTy1billion[MM] -- instead change "Microtile Overlay" to "Impassable"
[04:04 am]
O)FaRTy1billion[MM] -- er, wait, idk why i was looking for height
[04:03 am]
O)FaRTy1billion[MM] -- below the minimap should be a thing that says "Overlay Settings" with a little + button in the corner, press the + to expand it, uncheck Use Defaults, then change "Tile Overlay" to "Height"
[03:57 am]
Sylph-Of-Space -- Unless I'm dum (possible)
[03:57 am]
Sylph-Of-Space -- It would be so so so nice if SCMDraft had some kind of dedicated "walkability" view for the tilesets.
[03:53 am]
Sylph-Of-Space -- :'( dont cry for me cat-gentina
[09:18 pm]
Ultraviolet -- 🔪🐈
[12:34 pm]
NudeRaider -- curiosity kills the cat!
[06:18 am]
Sylph-Of-Space -- No complaints here, i'm just curious!
Please log in to shout.


Members Online: O)FaRTy1billion[MM]