Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Units won't create.
Units won't create.
Apr 18 2011, 7:16 pm
By: Pr0nogo  

Apr 18 2011, 11:51 pm UnholyUrine Post #21



Read on up the links I posted above about Wait blocks.

Having multiple waits in one trigger will just stack waits up on each other, and not only that, if multiple triggers with Wait happen at the same time, they'll stack together as well

So, yes, Remove All waits.. Use Hyper Triggers and use Death Counters..
it's highly, HIGHLY recommended u do NOT use waits or transmission (use Display Text + Play Wav instead) unless u absolutely have to.

If u don't want to go thru all that work, then try to limit it so that only one of any triggers that contain the wait action is firing at one time.



None.

Apr 19 2011, 1:34 am rockz Post #22

ᴄʜᴇᴇsᴇ ɪᴛ!

I'm going to focus on just this trigger:

Trigger("Player 2"){
Conditions:
Deaths("Player 2", "Terran Marine", Exactly, 1000);

First off, why are you creating and killing so many things at different times, and why do you need sunkens/spores/ultras? Why do you need a wait in between when they are made and when they die? Can't you simply put it into a single frame?

One of the most important parts of debugging a starcraft map is figuring out which triggers run, and which don't run. Get rid of that "wait 3000" at the beginning and see if the trigger starts to create sunkens. If it does, then you have a wait block preventing the rest of the trigger's actions from running. If it doesn't run, then you clearly haven't set switch11 AND switch7. Figure out which one of the two haven't been set, and fix it.



"Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

Apr 19 2011, 1:40 am Lanthanide Post #23



Quote from Pr0nogo
EDIT: Something tells me I really misunderstood the concept of death counters. Gonna try another quick thing and re-edit this post.
I haven't actually looked at the triggers in your post, so don't take this as an interpretation of what you've done.

I think death counters are confusing for a lot of people because they are distinctly used for two different, but related, concepts in mapping.

At their most basic, death counters can be used to replace switches, and to replace waits. Effectively this works like this:
Replacing a switch: DC has value of 0 (false) or 1 (true)
Replacing a wait: There are approx 12 DCs per real-time second at Fastest game speed, so if you have a trigger that is "Always: Add 1 to X DC", then when X DC is exactly 12, one real-time second has passed.

DCs are actually more powerful than simple switches though. With switches, if you wanted to have 4 possible outcomes, you'd need two switches with different combinations of truth values: TT, TF, FT and FF. With a DC you simply have 4 possible values: 0, 1, 2 or 3. You can easily expand this out to 20 possible values, just using 0 to 19 (or 1 to 20), whereas with pure switches you'd need at least 5 different switches (2^5 = 32 outcomes), and you'd have to deal with all of the 'extra' outcomes that you don't have specific cases for.

You can also combine the switch behaviour and the timing behaviour into the same DC. For example, you can have triggers like this:
Code
Condition: DC is at most 12
Action: Subtract 1

Condition: DC is exactly 0
Action: Create unit (or whatever), set DC to 12

Condition: [Something happens that we want to stop unit creation]
Action: Set DC to 20


With these 3 triggers, we would initially set the DC to be 12, and it would create units (or whatever), every real-time second. Then, if we wanted to stop spawning units (player moves marine onto a beacon, or whatever), we can set the DC to 20 and that will stop more units being spawned. If we wanted to start spawning units again, we could have a 4th trigger that set the value back to 12 (or 0, or anything less than 12 really).

There are only three advantages that switches have over DCs:
* Switches can be randomized - the only decent source of randomization available for use in triggering
* Switches can be easily flipped from true to false using "Toggle". You can get the same behaviour out of DCs but it's a bit more fiddly / requires more triggers to do.
* Switches don't correspond to real units in the game. If you have an 8 player map where all players use all playable units, and they can die, then you'll only have a limited number of DCs to work with, but it is still quite a generous amount.



None.

Apr 19 2011, 2:03 am Kaias Post #24



Quote from Pr0nogo
I'd rather use things I understand.
Well you clearly don't understand waits either. A good rule of thumb is to never use waits (aside from hyper triggers) unless you really know what you're doing, which even then is unadvised.

Think of deathcounts like variables, in math. Consider the following 3 triggers:

Quote from
Trigger 1:
Set X to 20

Trigger 2:
If X is at least 1
Then subtract 1 from X

Trigger 3:
If X is exactly 0
Then display message: "We just counted down from 20, once each trigger cycle. About 12 cycles pass every second, so a little less than 2 seconds passed from the time X was set to 20 to this moment"
Except, the only way we can effectively do this in SC triggers is to make our variable a death counter. The equivalent of the above would have to look like this:
Quote from
Trigger 1:
Conditions: Always
Actions: Set Deaths of Terran Marker for Player 1 to 20

Trigger 2:
Conditions: Deaths of Terran Marker for Player 1 is at least 1
Actions: Subtract 1 Deaths of Terran Marker for Player 1; Preserve Trigger();

Trigger 3:
Conditions: Deaths of Terran Marker for Player 1 is exactly 1
Actions: Display message: "We just counted down from 20, once each trigger cycle. About 12 cycles pass every second, so a little less than 2 seconds passed from the time X was set to 20 to this moment"
You can use any unit in place of Terran Marker, but you should make certain that you don't use a unit that could potentially die in-game.



None.

Apr 19 2011, 1:16 pm Pr0nogo Post #25



Quote from rockz
I'm going to focus on just this trigger:

Trigger("Player 2"){
Conditions:
Deaths("Player 2", "Terran Marine", Exactly, 1000);

First off, why are you creating and killing so many things at different times, and why do you need sunkens/spores/ultras? Why do you need a wait in between when they are made and when they die? Can't you simply put it into a single frame?

One of the most important parts of debugging a starcraft map is figuring out which triggers run, and which don't run. Get rid of that "wait 3000" at the beginning and see if the trigger starts to create sunkens. If it does, then you have a wait block preventing the rest of the trigger's actions from running. If it doesn't run, then you clearly haven't set switch11 AND switch7. Figure out which one of the two haven't been set, and fix it.

The Sunkens/Spores/Ultralisks are for defending the Satellite Relay. The reason they're at different times is purely for cinematic purposes. It wouldn't be as cool if they all just warped in at the same time (the create/kill/create bit is the triggered 'animation' for Zerg buildings and Ultralisks dropping onto the battlefield, as opposed to them just appearing on the ground for whatever reason).

The 'wait 3000' is to ensure that the structures aren't trying to be created when the players still have units in the way, but I suppose that could be counteracted adding in a condition that doesn't create the units unless there are no units owned by force 1 in the location.

Oh, and removing the 'wait 3000' doesn't work, so it's gotta be a wait block created by something else. I'll swap out transmission for play wav / talking portrait / display text message, but that only creates more wait blocks AFAIK because I have to have waits in between each pw/tp/dtm. >_>

EDIT: Would this work, death-count wise?

Trigger
Players
  • Player 2
  • Conditions
  • Player 2 has suffered at least 1 deaths of Zerg Overmind
  • Actions
  • Subtract 1 Deaths of Zerg Overmind for Player 2
  • Preserve Trigger


  • Trigger
    Players
  • Player 2
  • Conditions
  • {whatever I need to check if the Satellite Relay is claimed or not}
  • Actions
  • Set deaths of Zerg Overmind for Player 2 to 36,000 (12x3,000 for a 3,000 ms wait)


  • Trigger
    Players
  • Player 2
  • Conditions
  • {whatever I need to check if Giiralnesh was supposed to arrive}
  • Actions
  • Set deaths of Zerg Overmind to 12,000 (the trigger asks for a 1,000 ms wait)


  • AFAIK this should work fine, assuming there's not already a huge shitblock of waits (which I still have yet to find).

    Post has been edited 2 time(s), last time on Apr 19 2011, 1:24 pm by Pr0nogo.




    Apr 19 2011, 3:20 pm Lanthanide Post #26



    I haven't looked at your other triggers, but what you've outlined there is good.

    EXCEPT that you've got your times way way off. 1000 milliseconds = 1 second. 3000 milliseconds = 3 seconds. Therefore you want 12 DC, and 36 DC. With DCs of 12,000 and 36,000 What you've got is 1,000 seconds and 3,000 seconds.

    I guess that's what happens when your country uses illogical old-world measurement systems instead of metric.



    None.

    Apr 19 2011, 4:07 pm Dem0n Post #27

    ᕕ( ᐛ )ᕗ

    Quote from Lanthanide
    I haven't looked at your other triggers, but what you've outlined there is good.

    EXCEPT that you've got your times way way off. 1000 milliseconds = 1 second. 3000 milliseconds = 3 seconds. Therefore you want 12 DC, and 36 DC. With DCs of 12,000 and 36,000 What you've got is 1,000 seconds and 3,000 seconds.

    I guess that's what happens when your country uses illogical old-world measurement systems instead of metric.
    Metric system has nothing to do with this sort of calculating. :massimo:




    Apr 19 2011, 4:10 pm ubermctastic Post #28



    A good thing to do for cinematic parts is to have a death counter start at 0 and increase by 1 every trigger cycle.
    When you want a certain trigger to fire at a specific time you can add a trigger that creates the unit when the deathcount is at say.... 240 which is 20 seconds in.
    If you want the animation to replay continuously just reset it back to 0 when it hits the ammount you want.
    I would recomend starting at 0 instead of counting down for cinematics. That way you can always make the cinematic longer without having to change all the previous time values.



    None.

    Apr 19 2011, 4:43 pm poison_us Post #29

    Back* from the grave

    (1/84)*1000 = 11.904762. If you plan on having any accurate sort of DC trigger, you'll need to account for that extra trigger every 10 cycles. For example, at 100 seconds you'll have 119 triggers fired, not 120. Just throwing this in there so that you don't mess up too much ;)




    Apr 19 2011, 5:34 pm Pr0nogo Post #30



    Quote from Lanthanide
    I haven't looked at your other triggers, but what you've outlined there is good.

    EXCEPT that you've got your times way way off. 1000 milliseconds = 1 second. 3000 milliseconds = 3 seconds. Therefore you want 12 DC, and 36 DC. With DCs of 12,000 and 36,000 What you've got is 1,000 seconds and 3,000 seconds.

    I guess that's what happens when your country uses illogical old-world measurement systems instead of metric.

    Ohai. I'm from Poland, and I use the metric system. Like Dem0n said, nothing to do with this.

    Anyways, thanks.

    Quote from poison_us
    (1/84)*1000 = 11.904762. If you plan on having any accurate sort of DC trigger, you'll need to account for that extra trigger every 10 cycles. For example, at 100 seconds you'll have 119 triggers fired, not 120. Just throwing this in there so that you don't mess up too much ;)

    More confusion...




    Apr 19 2011, 6:06 pm Dem0n Post #31

    ᕕ( ᐛ )ᕗ

    Basically, 12 death counts don't equal exactly 1 second, but it's the closest we can get. What poison was saying was to just make sure your deaths are allowing enough triggers to fire so that your wait doesn't end early or anything.




    Apr 19 2011, 6:19 pm Pr0nogo Post #32



    Quote from name:Dem0nS1ayer
    Basically, 12 death counts don't equal exactly 1 second, but it's the closest we can get. What poison was saying was to just make sure your deaths are allowing enough triggers to fire so that your wait doesn't end early or anything.

    Ohai. Thanks.




    Apr 19 2011, 8:08 pm rockz Post #33

    ᴄʜᴇᴇsᴇ ɪᴛ!

    Quote from Lanthanide
    I guess that's what happens when your country uses illogical old-world measurement systems instead of metric.
    says the man whose country uses base 10.

    when you use hyper triggers, each trigger runs every 84 milliseconds (usually more due to lag). Thus, you need to use simple math to convert from seconds to hyper trigger runs. 1 hyper trigger run = 84 milliseconds. So convert waits:

    3000 milliseconds * 1 hyper trigger run / 84 milliseconds = 35.7 hyper trigger runs. You may as well round up to 36. Since you increase the death counter by 1 every hyper trigger run, each hyper trigger run is equal to 1 death count.

    If you don't use hyper triggers, it's much less accurate, and hyper triggers vary with game speed (waits do not).



    "Parliamentary inquiry, Mr. Chairman - do we have to call the Gentleman a gentleman if he's not one?"

    Apr 19 2011, 9:44 pm Lanthanide Post #34



    Quote from poison_us
    If you plan on having any accurate sort of DC trigger, you'll need to account for that extra trigger every 10 cycles.
    No player on battle.net is ever going to notice your timers being out by one twelfth of a second every ten seconds. It does have implications if you're trying to play looping background music, but otherwise such precision is really not necessary.



    None.

    Options
      Back to forum
    Please log in to reply to this topic or to report it.
    Members in this topic: None.
    [2024-4-27. : 9:38 pm]
    NudeRaider -- Ultraviolet
    Ultraviolet shouted: NudeRaider sing it brother
    trust me, you don't wanna hear that. I defer that to the pros.
    [2024-4-27. : 7:56 pm]
    Ultraviolet -- NudeRaider
    NudeRaider shouted: "War nie wirklich weg" 🎵
    sing it brother
    [2024-4-27. : 6:24 pm]
    NudeRaider -- "War nie wirklich weg" 🎵
    [2024-4-27. : 3:33 pm]
    O)FaRTy1billion[MM] -- o sen is back
    [2024-4-27. : 1:53 am]
    Ultraviolet -- :lol:
    [2024-4-26. : 6:51 pm]
    Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
    [2024-4-26. : 6:50 pm]
    NudeRaider -- Vrael
    Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
    sounds like moisture control is often a pressing concern in your city
    [2024-4-26. : 6:50 pm]
    Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
    [2024-4-26. : 6:49 pm]
    Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
    [2024-4-26. : 6:48 pm]
    Vrael -- On this Topic, I could definitely use some Introductions.
    Please log in to shout.


    Members Online: Roy