Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: My second attack don't work.
My second attack don't work.
Mar 11 2009, 9:04 pm
By: TommyKnockers  

Mar 11 2009, 9:04 pm TommyKnockers Post #1



Hi guys, i try to make ai-like trigger but something wrong.

Idea is simple;
create some unit with "create unit" action command in "Elapsed scenaria time is exactly ... game seconds" condition command and attack (Send all units on strategic missions)
note: created units are mixed races.

Trigger("Player 8"){
Conditions:
Elapsed Time(Exactly, 180);
Actions:
Create Unit("Player 8", "Zerg Zergling", 15, "create_zone");
Create Unit("Player 8", "Protoss Zealot", 4, "create_zone");
Create Unit("Player 8", "Terran Marine", 4, "create_zone");
Create Unit("Player 8", "Terran Medic", 4, "create_zone");
Run AI Script("SuiR");
}

This is my first trigger and it's works properly, created units (all races) start attack without any problem.
But second trigger don't work properly, created units don't attack. (actually second trigger like first trigger)
Second Trigger:

Trigger("Player 8"){
Conditions:
Elapsed Time(Exactly, 280);

Actions:
Create Unit("Player 8", "Zerg Zergling", 15, "create_zone");
Create Unit("Player 8", "Protoss Zealot", 8, "create_zone");
Create Unit("Player 8", "Terran Marine", 6, "create_zone");
Create Unit("Player 8", "Protoss Observer", 2, "create_zone");
Create Unit("Player 8", "Terran Medic", 2, "create_zone");
Create Unit("Player 8", "Terran Goliath", 4, "create_zone");
Run AI Script("Suic");
}

i'm stuck and i need advices. :crazy:

Post has been edited 2 time(s), last time on Mar 13 2009, 9:27 pm by TommyKnockers.



None.

Mar 11 2009, 9:47 pm 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

afaik this should work, but since it doesn't maybe you have to reset the AIs for that computer.
You can do that by giving away all units for that player for a short time.

Oh and be careful when you say exactly x seconds. Without hyper triggers, triggers are checked every 2 seconds so you might miss the point. Making it at least x seconds is safer.




Mar 12 2009, 10:51 am TommyKnockers Post #3



Quote from NudeRaider
afaik this should work, but since it doesn't maybe you have to reset the AIs for that computer.
You can do that by giving away all units for that player for a short time.

Oh and be careful when you say exactly x seconds. Without hyper triggers, triggers are checked every 2 seconds so you might miss the point. Making it at least x seconds is safer.

Sorry but i don't understand what you mean. How i can reset the AIs for computer, can you write an example for "away".

Thank you for your advice about trigger check period, i will use at least.



None.

Mar 12 2009, 12:57 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

Give all units for P8 to P11
wait 1000ms
GIve all units for P11 to P8




Mar 12 2009, 2:27 pm TommyKnockers Post #5



Quote from NudeRaider
Give all units for P8 to P11
wait 1000ms
GIve all units for P11 to P8

"P8 to P11" and "P11 to P8" ?
You mean create units for P8 and give this units to P11 and wait 1000ms and transfer this units P8 back.?



None.

Mar 12 2009, 4:31 pm NudeRaider Post #6

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

Quote from TommyKnockers
How i can reset the AIs for computer, can you write an example for "away".
Give away (and back):
Quote from NudeRaider
Give all units for P8 to P11
wait 1000ms
GIve all units for P11 to P8
To be exact you do
Give all [any unit] for P8 at 'Anywhere' to P11




Mar 12 2009, 8:49 pm TommyKnockers Post #7



thx for your reply NudeRaider

i try your advices but it's don't work.
My triggers are;

Trigger("Player 8"){
Conditions:
Elapsed Time(At least, 2);

Actions:
Create Unit("Player 8", "Zerg Zergling", 4, "create_zone");
Create Unit("Player 8", "Protoss Zealot", 2, "create_zone");
Create Unit("Player 8", "Terran Marine", 2, "create_zone");
Run AI Script("Suic");
}

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

Trigger("Player 8"){
Conditions:
Elapsed Time(At least, 17);

Actions:
Create Unit("Player 8", "Zerg Zergling", 4, "create_zone");
Create Unit("Player 8", "Protoss Zealot", 2, "create_zone");
Create Unit("Player 8", "Terran Marine", 2, "create_zone");
Run AI Script("Suic");
Give Units to Player("Player 8", "Player 11", "Any unit", All, "create_zone");
Wait(1000);
Give Units to Player("Player 11", "Player 8", "Any unit", All, "create_zone");
}

and if you have enought time; this is my UMS map:

Attachments:
dene.scm
Hits: 0 Size: 30.89kb



None.

Mar 12 2009, 10:07 pm ForTheSwarm Post #8



Give the units before running the script.



None.

Mar 12 2009, 10:47 pm 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

Yeah, when I said resetting the AI I meant stopping any AI running, and applying the new AI to a "fresh" computer.
A computer that controls no units stops running all AI scripts.

Therefore you should use 'Anywhere' for the giving as I suggested, because you have to make sure he has no unit at all. Not just no units in the target location.




Mar 13 2009, 8:54 pm TommyKnockers Post #10



Quote from NudeRaider
Yeah, when I said resetting the AI I meant stopping any AI running, and applying the new AI to a "fresh" computer.
A computer that controls no units stops running all AI scripts.

Therefore you should use 'Anywhere' for the giving as I suggested, because you have to make sure he has no unit at all. Not just no units in the target location.

I give units before running the script but nothing changed

also i try with "Anywhere" instead of "create_zone" but in this case game ended with player victory.
i try increase the giving time or some different versions of giving (second comp. for giving [P7] etc.) but nothing changed.

second tigger last state:

Trigger("Player 8"){
Conditions:
Elapsed Time(At least, 17);
Actions:
Create Unit("Player 8", "Zerg Zergling", 4, "create_zone");
Create Unit("Player 8", "Protoss Zealot", 2, "create_zone");
Create Unit("Player 8", "Terran Marine", 2, "create_zone");
Give Units to Player("Player 8", "Player 11", "Any unit", All, "create_zone");
Wait(5000);
Give Units to Player("Player 11", "Player 8", "Any unit", All, "create_zone");
Run AI Script("Suic");
}


i need some new advices please



None.

Mar 13 2009, 8:59 pm ForTheSwarm Post #11



Quote from TommyKnockers
also i try with "Anywhere" instead of "create_zone" but in this case game ended with player victory.

Change your player victory condition. Instead of using:

Code
Player 8 commands 0 units

(which I assume you are using), use:

Code
Player 8 commands 0 units
Player 11 commands 0 units

Now if you use Give Units at Anywhere, you shouldn't have a player victory.



None.

Mar 13 2009, 9:18 pm TommyKnockers Post #12



I change player victory condition, now game continue but second created units still cannot make attack.

Trigger 2:

Trigger("Player 8"){
Conditions:
Elapsed Time(At least, 17);

Actions:
Create Unit("Player 8", "Zerg Zergling", 4, "create_zone");
Create Unit("Player 8", "Protoss Zealot", 2, "create_zone");
Create Unit("Player 8", "Terran Marine", 2, "create_zone");
Give Units to Player("Player 8", "Player 11", "Any unit", All, "Anywhere");
Wait(2000);
Give Units to Player("Player 11", "Player 8", "Any unit", All, "Anywhere");
Run AI Script("Suic");
}



None.

Mar 13 2009, 10:37 pm NudeRaider Post #13

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

Hm... that's strange. Should work. Have you tried to apply another AI (e.g. random suicide) or order to patrol?

Also I'm pretty sure that's not the problem, but it would make sense to create the units after you have resetted the AI. Fewer units are given - more efficient and giving to a neutral player sometimes screws with the unit AIs.




Mar 13 2009, 10:38 pm TommyKnockers Post #14



It's solved by Order action command.
Thank you anyone who try to help me.

Trigger("Player 8"){
Conditions:
Always();

Actions:
Run AI Script("Suic");
}

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

Trigger("Player 8"){
Conditions:
Elapsed Time(At least, 2);

Actions:
Create Unit("Player 8", "Zerg Zergling", 4, "create_zone");
Create Unit("Player 8", "Protoss Zealot", 2, "create_zone");
Create Unit("Player 8", "Terran Marine", 2, "create_zone");
; Run AI Script("Suic");
Order("Player 8", "Any unit", "create_zone", "attack_zone", attack);
}

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

Trigger("Player 8"){
Conditions:
Elapsed Time(At least, 17);

Actions:
Create Unit("Player 8", "Zerg Zergling", 4, "create_zone");
Create Unit("Player 8", "Protoss Zealot", 2, "create_zone");
Create Unit("Player 8", "Terran Marine", 2, "create_zone");
Order("Player 8", "Any unit", "create_zone", "attack_zone", attack);
}



None.

Mar 13 2009, 10:47 pm NudeRaider Post #15

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

Seems like the first trigger is useless (unless you have preplaced units you are sending to attack).

And you should use the patrol order instead of attack, because with attack units tend to only retaliate when attacked first, instead of attack anything in sight.




Mar 14 2009, 3:57 am TommyKnockers Post #16



NudeRaider thank you for your advices, i will try patrol order instead of attack.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[03:57 am]
NudeRaider -- https://staredit.net/381600/ You have 5 minutes, then you can only edit your posts.
[04:05 pm]
NudeRaider -- DarkenedFantasies
DarkenedFantasies shouted: you eat lots of beans
:lol:
[11:30 am]
NudeRaider -- I would like 3000 minerals, please
[2026-4-16. : 7:32 pm]
Zoan -- I got $2000 bonus. I would like 2000 minerals, please
[2026-4-16. : 4:15 am]
DarkenedFantasies -- you eat lots of beans
[2026-4-16. : 3:46 am]
IskatuMesk -- how do i get gas
[2026-4-15. : 11:43 pm]
Moose -- you don't
[2026-4-15. : 10:06 pm]
Zoan -- how do i get minerals
[2026-4-14. : 11:45 pm]
ClansAreForGays -- Anyone wanna played Skewed StarCraft?
[2026-4-14. : 12:07 am]
Vrael -- NudeRaider
NudeRaider shouted: Vrael ranting still is though
you're a gentleman and a scholar, thank you
Please log in to shout.


Members Online: RIVE, jun3hong