Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Adding minerals trigger problem
Adding minerals trigger problem
Jun 6 2014, 8:18 am
By: twilight_marine  

Jun 6 2014, 8:18 am twilight_marine Post #1



So I have triggers that give a player minerals if he has a marine. The map doesnt involve killing any buildings:

Trigger 1:
Always.
Modify score for current player: add 1 razings
Preserve trigger

Trigger 2:
Current player razings score is at least 10.
Modify score for current player: set to 0 razings.
Preserve trigger

Trigger 3
Current player commands at least 1 marine.
Current player razings score is at most 1.
Actions: modify resources for current player: add 1 ore.
Preserve trigger.

These set of triggers exist for players 1-8. These triggers work well to give minerals when player 8 is Computer. However when I set player 8 as Human, amount of minerals added per second become extremely slow or stops all together. Can you help me?

could this happen because I put hyper trigger on player 8? I somewhat doubt it because all players 1-8 have hyper triggers and ACTION refers to current player to add 1 razings instead of player 8



None.

Jun 6 2014, 8:41 am Sacrieur Post #2

Still Napping

Do you have the map?

I'm not seeing anything here that would cause the problem you've described.

Hyper triggers should be checked under "all players". It isn't necessary to write them for each player.



None.

Jun 6 2014, 9:40 am twilight_marine Post #3



heres the map

Post has been edited 1 time(s), last time on Jun 6 2014, 11:26 am by twilight_marine. Reason: remove fiile



None.

Jun 6 2014, 10:22 am Sacrieur Post #4

Still Napping

So your problem is that you're getting a wait block.

You have a single trigger for force 1 running sounds. While you can have a wait action run for one player while using hypers, another player, who isn't running waits, must also be running the hypers. When you move player 8 to force 2 and switch over to computer control, the player is no longer running the wait from force 1, so the hypers can run without blocks.

The solution is to not use waits for your map and instead use a DC timer. While the general rule is that 12 HT cycles equal one real second on fastest game speed, this isn't completely accurate. The figure is closer to 11.9 cycles. So there is a bit of trickery to get it to accurately keep track of the precise length needed for sound files,

The exact figure is calculated using the time SC spends on a single frame (42 ms on fastest), multiplying it by two, and then reciprocating it. This is because HTs run once every other frame. So we get 1/84 = 0.01190476 executions per ms or 11.90476 executions per second. For a wait of 120 seconds, we would take 120 and multiply it by this number to get a final value of 1428. This is how long your DC timer should be set for. In summary:

Condition:
DC = 0

Actions:
Play sound stuffs.
Set DC to 1428.
Preserve trigger.

---

Condition:
Always

Actions:
Subtract 1 from DC.
Preserve trigger.

Post has been edited 1 time(s), last time on Jun 6 2014, 10:28 am by Sacrieur.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[2026-3-03. : 9:33 pm]
Ultraviolet -- boo sacrilege, get outta here
[2026-3-03. : 8:47 am]
NudeRaider -- also the sc2 campaign mechanics were way more fun and involving
[2026-3-03. : 8:38 am]
NudeRaider -- maybe that people don't actually like the pathfinding jank and having to use trigger duplicators to do basic arithmetic.
[2026-3-02. : 4:08 am]
da real donwano -- Ultraviolet
Ultraviolet shouted: da real donwano and you remember the time spent there in shame
Honestly, that's exactly it too. Nothing could ever top OG SC, what was Blizz thinking?
[2026-3-01. : 5:33 pm]
Ultraviolet -- sing it brotha
[2026-2-27. : 8:40 pm]
lil-Inferno -- penis and balls part 3
[2026-2-26. : 8:48 pm]
Ultraviolet -- da real donwano
da real donwano shouted: SC2 was like one of those one night stands you have zero recollection of besides a random slippery memory that fades in and out of existence once every 4-5 years.
and you remember the time spent there in shame
[2026-2-25. : 4:15 pm]
poison_us -- My real superpower is ruining jokes. NudeRaider
NudeRaider shouted: poison_us ya, but my joke wouldn't have worked as well if I hadn't used that exaggeration. :massimo:
[2026-2-25. : 5:47 am]
NudeRaider -- poison_us
poison_us shouted: NudeRaider I'm not mad, I'm just disappointed.
ya, but my joke wouldn't have worked as well if I hadn't used that exaggeration. :massimo:
[2026-2-25. : 2:03 am]
poison_us -- NudeRaider
NudeRaider shouted: Ultraviolet to think we just added all the categories when sc2 came out because we thought people would become mad if we didn't facilitate it. And now, 16 years later, we finally got proven right! :lol:
I'm not mad, I'm just disappointed.
Please log in to shout.


Members Online: IlyaSnopchenko, NudeRaider