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.
[02:58 pm]
Ultraviolet -- Symmetry
Symmetry shouted: Man I wish we had this tech back in the day when people played ums lmao
fr fr
[02:39 am]
Symmetry -- Man I wish we had this tech back in the day when people played ums lmao
[2026-7-16. : 6:28 am]
NudeRaider -- EUD actions, specifically. The conditions remained. Today we can even have actions again, but they're all virtualized/whitelisted (not sure on the actual technical implementation) so you can only use them for specific intended purposed, not arbitrary code injections.
[2026-7-16. : 6:26 am]
NudeRaider -- I mean yes, maps - through EUDs - were theoretically able to do that as well, but that was patched quickly.
[2026-7-16. : 6:25 am]
NudeRaider -- Symmetry
Symmetry shouted: Ohhh imagine a SC map that could delete itself
not the map, the editor
[2026-7-16. : 2:28 am]
Symmetry -- I vaguely remember Voy doing some ACE back in the day, but I had no idea EUDs could do that kind of shit. I am very much catching up on the technology
[2026-7-16. : 2:28 am]
Symmetry -- Ohhh imagine a SC map that could delete itself
[2026-7-15. : 8:51 pm]
NudeRaider -- Symmetry
Symmetry shouted: NudeRaider Is EUD editor capable of writing shit onto the player's harddrive? That seems like it would be dangerous
yeah an editor that isn't allowed to write files sounds rather pointless, so I'd assume it can. Like most other programs too btw. and yes, obviously that's dangerous, but also kinda necessary. MS introduced that virtualization for exactly that reason.
[2026-7-15. : 4:10 am]
Ultraviolet -- I don't think so. I think they shut that shit down after 1.16, maybe even earlier
[2026-7-15. : 2:19 am]
Symmetry -- NudeRaider
NudeRaider shouted: Symmetry I can't tell if it's relevant. You provided literally no context so I was providing an equally generic answer.
Is EUD editor capable of writing shit onto the player's harddrive? That seems like it would be dangerous
Please log in to shout.


Members Online: Heinermann, Ultraviolet