Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: AI Recall Trigger
AI Recall Trigger
May 10 2013, 12:22 am
By: Omegwavex  

May 10 2013, 12:22 am Omegwavex Post #1



Alright, so a spell im working on is suppose to recall the 4 corners of the arena. The computer has arbitors with full energy and recall researched, so Idk what's wrong. Can someone please tell me how to use the AI recall trigger?

If you need anymore info just post here.



None.

May 10 2013, 12:32 am Lanthanide Post #2



Have you followed the instructions here: http://www.staredit.net/?p=oldwiki&s=94 ?



None.

May 10 2013, 1:37 am lil-Inferno Post #3

Just here for the pie

Make sure you aren't using hero Arbiters.




May 10 2013, 3:52 am Kaias Post #4



Make sure your RunAIScriptAtLocation is run by the player that owns the arbiters.



None.

May 10 2013, 5:24 am NudeRaider Post #5

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

Maybe the condition isn't going off. Check with something noticable like creating a building over water (unplaceable error).




May 10 2013, 2:33 pm Oh_Man Post #6

Find Me On Discord (Brood War UMS Community & Staredit Network)

If there are too many sprite animations the recalls won't show. Had this problem myself once.




May 10 2013, 10:25 pm Omegwavex Post #7



Alright, I got the recalls in, but I have another question.

Once the recalls start, there is suppose to be a scout spawning at each corner, then moving clockwise around the map.
I can do all the timing and stuff, just wondering if anyone knows a way so it spawns 1 scout, waits a little while, then spawns another instead of spawn spamming one, and in the end getting like, 50 scouts at 1 corner.

Everytime I use a wait for this, It freezes the trigger, even if its for 50 milliseconds.

Post has been edited 1 time(s), last time on May 10 2013, 10:58 pm by Omegwavex.



None.

May 10 2013, 11:22 pm Moose Post #8

meme

That sounds like a wait block. Three possible solutions:

1. If you are using the Wait(0)x63 type of hypers, move them to the bottom of the trigger list to prevent (most) related wait blocks.

2. Use switch hyper triggers instead. Example:
"Switch Hypers"
Trigger("Player 8"){ // <-- Can be any player GREATER than the owner of the next trigger, since this player must check triggers SECOND.
Conditions:
    Always();

Actions:
    Wait(0);
    Set Switch("Switch1", set);
    Wait(0);
    Preserve Trigger();
}

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

Trigger("Player 7"){  // <-- Can be any player LESS THAN than the owner of the previous trigger, since this player must check triggers FIRST.
Conditions:
    Switch("Switch1", set);

Actions:
    Set Switch("Switch1", clear);
    Wait(0);
    Preserve Trigger();
}

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


3. Eliminate the waits entirely and switch to death counter (DC) timers.



None.

May 10 2013, 11:23 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

You're running into Wait Blocks.

It is strongly recommended that you use Death Counters as your timers instead of waits which is also the answer to delaying the scout spawns.

Basically Death counters are the equivalent of variables in programming languages. You (mis-)use the death counters of unused units to store and retrieve values. And since with Hyper Triggers you know each trigger loop is 1/8 of a game second it's easy to create a counter with which you can measure time. The counter value becomes equivalent of a certain time span so you can calculate when to spawn a scout.

For example you want to create a scout every 5 (ingame) seconds. What you do is add 1 death for cantina every trigger loop.
When cantina reaches 8 triggers / s * 5s = 40 death counts you reset the death counter of cantina to 0 and create 1 scout.




May 11 2013, 12:02 am Omegwavex Post #10



Thanks guys. My friend gave me a solution to just have a unit timer; everytime a zergling reaches location B, send it back to location A, then do the recalls and scouts.



None.

May 11 2013, 6:48 am NudeRaider Post #11

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

That's bad practice. You should wrap your head around the death counter system if you're at least half serious about your map.

Death counters are so much more professional, clean, reliable, precise and resource friendly than physical timers. And once you got the principle down they're even easier to implement.




May 11 2013, 3:40 pm Omegwavex Post #12



I just couldn't find a way to make DC's equal up for the computer and a player. I needed them both to end at the same time, so we just thought that adding one each time he got to Location B was a good solution.



None.

May 11 2013, 8:10 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

There's is no reason to even them up. Set/Add them for a specific player that'll always be in the game (for example a P8 computer player) and always read them for that player. Players can read/write other player's death counts.

For example:
Trigger
Players
  • Player 7
  • Conditions
  • Player 8 has suffered at least 40 deaths of cantina
  • Actions
  • Set deaths of cantina for Player 8 to 0
  • Create Scout for Current Player at 'Spawn'
  • Preserve Trigger


  • The reason you can't "synch" the counts of different players that you have waits in your map.
    Whenever a wait runs it breaks the current trigger loop and starts a new one, meaning players with a higher number than the player number that ran the wait will run 1 less trigger loop. Or rather the other players will run an extra loop.




    Options
      Back to forum
    Please log in to reply to this topic or to report it.
    Members in this topic: None.
    [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
    [2026-4-13. : 10:07 pm]
    NudeRaider -- ya why phone people when you can just write letters
    [2026-4-13. : 9:37 pm]
    IskatuMesk -- I have never and will never own a phone
    [2026-4-13. : 9:15 pm]
    NudeRaider -- Vrael ranting still is though
    [2026-4-13. : 9:14 pm]
    ClansAreForGays -- anticapitalism isnt edgy anymore
    [2026-4-13. : 3:31 pm]
    Vrael -- it only costs 50% of my post-tax salary for life and in return I get to also become a drone whose sole purpose is CAPITALISM
    [2026-4-13. : 3:30 pm]
    Vrael -- pssht, you're still using a phone? I just record 100% of my life using my ElonBrainChip
    [2026-4-13. : 2:13 pm]
    NudeRaider -- bro I don't go anywhere without my phone to record anything significant
    [2026-4-13. : 1:28 pm]
    Vrael -- Zoan
    Zoan shouted: not if u wer there
    id say even if you were there its tricky, human memory can be very faulty
    Please log in to shout.


    Members Online: anoeth47