Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Preserve trigger keeps spawning units
Preserve trigger keeps spawning units
Mar 16 2022, 2:57 pm
By: Sala  

Mar 16 2022, 2:57 pm Sala Post #1



I want a single unit to spawn every time a condition is met. For example, each time a Zergling dies, I want one more Zergling to spawn somewhere else. In testing when I kill a ling and preserve trigger is on, they just keep spawning lings nonstop. How do I solve this?



None.

Mar 16 2022, 5:50 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

The problem is that you can't modify kills counter. Maybe death counter works for you? You can modify that.




Mar 16 2022, 6:41 pm Prankenstein Post #3



Quote from Sala
I want a single unit to spawn every time a condition is met. For example, each time a Zergling dies, I want one more Zergling to spawn somewhere else. In testing when I kill a ling and preserve trigger is on, they just keep spawning lings nonstop. How do I solve this?

If you post the exact trigger you're using, it's easier to help.



None.

Mar 16 2022, 7:25 pm Sala Post #4



Quote from NudeRaider
The problem is that you can't modify kills counter. Maybe death counter works for you? You can modify that.

I can modify the death counter, but how do I use that death counter to continuously trigger an event? Do I just have to write 1,000 triggers for each possible number of deaths?

EDIT:
Quote from Prankenstein
Quote from Sala
I want a single unit to spawn every time a condition is met. For example, each time a Zergling dies, I want one more Zergling to spawn somewhere else. In testing when I kill a ling and preserve trigger is on, they just keep spawning lings nonstop. How do I solve this?

If you post the exact trigger you're using, it's easier to help.

Trigger("All players"){
Conditions:
Deaths("Current Player", :Zerg Zerglings", Exactly, 1);

Actions:
Create Unit("Current Player", "Zerg Zerglings", 1, "Respawn");
Preserve Trigger();
}

It's a problem that I can only choose "exact," "at least," or "at most" deaths, and not just have the trigger activate for any death. But even still, this causes nonstop Zergling spawn instead of just one.

Post has been edited 1 time(s), last time on Mar 16 2022, 9:02 pm by NudeRaider. Reason: pls edit instead of double posting



None.

Mar 16 2022, 8:08 pm Nekron Post #5



Youd need to subtract the death here




Mar 16 2022, 8:48 pm Sala Post #6



Quote from Nekron
Youd need to subtract the death here

You're a genius, I love you.



None.

Mar 17 2022, 12:45 am TheHappy115 Post #7



Depending on the circumstance, you may also want to change the condition to "at least 1 death" versus "exactly 1 death."

This would help solve issues should 2 Zerglings die at the same time resulting in the trigger not going off in the first case (unless you wanted something different to happen in that case). I imagine this could happen in cases where you want to increase the amount of Zerglings a player can control and die, and they remain with those same amount of units. This will only mean that 1 Zergling will spawn with each trigger check though. You can always increase the amount respawning at the same time by either duplicating the trigger or just adding a new one for cases where that happens. Duplicating the trigger shouldn't cause issues in the case where only 1 Zergling dies (because the condition on the first trigger will be satisfied and the action reduces the death count. Then the next trigger isn't satisfied since the previous one already set it to 0 deaths).



None.

Mar 17 2022, 5:20 am Sala Post #8



Quote from TheHappy115
Depending on the circumstance, you may also want to change the condition to "at least 1 death" versus "exactly 1 death."

This would help solve issues should 2 Zerglings die at the same time resulting in the trigger not going off in the first case (unless you wanted something different to happen in that case). I imagine this could happen in cases where you want to increase the amount of Zerglings a player can control and die, and they remain with those same amount of units. This will only mean that 1 Zergling will spawn with each trigger check though. You can always increase the amount respawning at the same time by either duplicating the trigger or just adding a new one for cases where that happens. Duplicating the trigger shouldn't cause issues in the case where only 1 Zergling dies (because the condition on the first trigger will be satisfied and the action reduces the death count. Then the next trigger isn't satisfied since the previous one already set it to 0 deaths).

Yeah the first thing I did was test with "exact" and when a group died at the same time, only one respawned. The "at least" setting fixed this.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[06: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.
[06: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
[06: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?
[06:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[06:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
[06:48 pm]
Vrael -- Perhaps that utilizes cutting-edge technology and eco-friendly cleaning products?
[06:47 pm]
Vrael -- Do you know anyone with a deep understanding of the unique characteristics of your carpets, ensuring they receive the specialized care they deserve?
[06:45 pm]
NudeRaider -- Vrael
Vrael shouted: I've also recently becoming interested in Carpet Cleaning, but I'd like to find someone with a reputation for unparalleled quality and attention to detail.
beats me, but I'd make sure to pick the epitome of excellence and nothing less.
[06:41 pm]
Vrael -- It seems like I may need Introductions to multiple companies for the Topics that I care deeply about, even as early as Today, 6:03 am.
[06:38 pm]
Vrael -- I need a go-to solution and someone who understands that Carpets are more than just decorative elements in my home.
Please log in to shout.


Members Online: Roy