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

We live in a society.

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.




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.
    [03:27 am]
    m.0.n.3.y -- Maybe because it's an EUD map?
    [03:27 am]
    m.0.n.3.y -- Can't upload maps to the DB. Error says "The action you have performed caused an Error". Any word?
    [07:46 am]
    RIVE -- :wob:
    [2024-4-22. : 6:48 pm]
    Ultraviolet -- :wob:
    [2024-4-21. : 1:32 pm]
    Oh_Man -- I will
    [2024-4-20. : 11:29 pm]
    Zoan -- Oh_Man
    Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
    You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
    [2024-4-20. : 8:20 pm]
    Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
    [2024-4-20. : 8:20 pm]
    Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
    [2024-4-20. : 8:18 pm]
    Ultraviolet -- Oh_Man
    Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
    oh ya I saw that when Armo posted it on Discord, pretty crazy
    [2024-4-20. : 8:09 pm]
    Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
    Please log in to shout.


    Members Online: CarpetCleaningWokin, Roy