Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Basic AI Script problem
Basic AI Script problem
Apr 23 2010, 2:28 am
By: TiMMaYj  

Apr 23 2010, 2:28 am TiMMaYj Post #1



The AI seems to break after the first unit group is destroyed;

I want the computer to control nothing but men; send those men to attack other groups of men already on the map. After the unit group's death, they should respawn and perform the same behavior.

I have the same trigger spawning these units, and then running the script: Send all units on strategic suicide mission. It works the first time, but the consecutive trigger fires will only spawn units; they just sit there doing nothing. Can anyone tell me why this is?

Quote from Example
Trigger("Player 5"){
Conditions:
Deaths("Current Player", "Ruins", At least, 1);
Deaths("Foes", "Cantina", Exactly, 0);
Bring("Foes", "Men", "1NO", Exactly, 0);
Switch("Random1", not set);
Switch("Random2", not set);
Switch("Random3", not set);
Bring("Current Player", "Men", "Arena", Exactly, 0);
Deaths("Current Player", "Left Wall Missile Trap", Exactly, 60);

Actions:
Comment("Random Assign: 1");
Set Deaths("Current Player", "Left Wall Missile Trap", Set To, 0);
Set Deaths("Current Player", "Cantina", Set To, 1);
Set Deaths("Current Player", "Ruins", Set To, 0);
Remove Unit("Current Player", "Psi Emitter");
Create Unit("Current Player", "Psi Emitter", 1, "1NO");
Create Unit("Current Player", "Protoss Dragoon", 3, "1NO");
Create Unit("Current Player", "Protoss Zealot", 4, "1NO");
Center View("1NO");
Play WAV("sound\\Terran\\CIVILIAN\\TCvRdy00.WAV", 0);
Run AI Script("Suic");
Preserve Trigger();
}

//-----------------------------------------------------------------//




None.

Apr 23 2010, 8:05 am NudeRaider Post #2

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

Spamming AIs will cause them to break. Only execute the AI on respawn.




Apr 23 2010, 9:54 am TiMMaYj Post #3



Quote from NudeRaider
Spamming AIs will cause them to break. Only execute the AI on respawn.

That's what i'm trying to do. The trigger that respawns the units is the same one that executes the AI script, right after they spawn in. However, they just stand there.



None.

Apr 23 2010, 11:08 am 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

Is it single player? Then the center view could cause a wait block.




Apr 29 2010, 8:32 pm DavidJCobb Post #5



I had the exact same problem as the OP, but I was spamming AI. Thing is, now that I stop spamming (and only run on respawn, as per your recommendation), the AI quit trying to attack anything after a short period of time. (And no, none of them die or respawn.)

(Specifically, I'm trying to make a Volcano Run map. There's a big line of barricades at the start that the "lava" (Zerglings) must tear through. Spamming AI gets them through all the barricades, but any non-pre-placed lings just stop for no reason en route to the player. Not spamming AI means they quit before they're even a third of the way through the barricade.)

Is there perhaps a recommended frequency for running the AI? I'm thinking that putting it on a timer may help, but I've no idea how to find the optimum time interval out. (Or is that already known?)

EDIT: Don't mean to hijack the thread... I just think that the problems are related and have a common solution; information on my problem may thus be helpful for assisting both of us.

Post has been edited 1 time(s), last time on Apr 29 2010, 9:21 pm by DavidJCobb.



None.

May 3 2010, 12:39 am Apos Post #6

I order you to forgive yourself!

Not sure if it can help, but in my http://www.staredit.net/topic/9792/ map, I spammed some AIs for the whole game and nothing glitch-ed.

Unless I may have not seen it...




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:56 am]
Oh_Man -- cool bit of history, spellsword creator talking about the history of EUD ^
[09:24 pm]
Moose -- denis
[05:00 pm]
lil-Inferno -- benis
[10:41 am]
v9bettel -- Nice
[2024-4-19. : 1:39 am]
Ultraviolet -- no u elky skeleton guy, I'll use em better
[2024-4-18. : 10:50 pm]
Vrael -- Ultraviolet
Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
hey cut it out I'm getting all the minerals
[2024-4-18. : 10:11 pm]
Ultraviolet -- :P
[2024-4-18. : 10:11 pm]
Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
[2024-4-17. : 11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
Please log in to shout.


Members Online: Oh_Man