Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: [SOLVED]Spawning too fast
[SOLVED]Spawning too fast
This topic is locked. You can no longer write replies here.
Sep 3 2010, 9:59 am
By: sraw531  

Sep 3 2010, 9:59 am sraw531 Post #1



Hello! I have been having trouble with my map, specifically I have made a trigger to create a mineral field if the mineral field that was there is no longer there.
Maybe it would be easier to explain by showing rather then describing.
Quote
Trigger("All players"){
Conditions:
Bring("All players", "Mineral Field (Type 1)", " ", At most, 0);
Elapsed Time(At most, 1500);
Deaths("Player 12", "Mineral Field (Type 1)", At most, 0);

Actions:
Create Unit("Neutral players", "Mineral Field (Type 1)", 1, " ");
Comment(" - - - Resources - - -");
Modify Unit Resource Amount("Neutral players", 4, 0, "sm1-12");
Set Deaths("Player 8", "Mineral Field (Type 1)", Set To, 16);
Preserve Trigger();
}
(I made the location name "blank" to save on strings)

The problem I seem to be having is that every time the mineral field needs to spawn, it will also put 2 Unplacable error messages (But will then stop). The main reason why I want to get rid of this is because (besides being sloppy), my map is planning on remaking mineral fields very frequently - IE all the time, and it causes too much spam. (I plan on having 40 of these "respawn fields" in the map, at least)

My first attempt to fix this was to add a death wait timer (Set Deaths("Player 8", "Mineral Field (Type 1)", Set To, 16); ), and have a seperate trigger lower that number, but this does not seem to fix the problem. My second attempt was to change all my hyper triggers to be nonzero numbers (I chose 100ms).

If you have advice specifically on which players should be used to spawn minerals, that would be appreciated.

Thanks in advance if you can help me. Please reply if you would like further clarification/to assist me.



None.

Sep 3 2010, 11:00 am Azrael Post #2



It's because you're creating the mineral field for Neutral Players instead of Current Player.

Also, I would suggest to start using "exactly 0" instead of "at most 0" to avoid more unexpected results.

Post has been edited 1 time(s), last time on Sep 3 2010, 11:05 am by Azrael.Wrath.




Sep 3 2010, 11:29 am sraw531 Post #3



why would i want the mineral field to be owned by a player? if it was a computer, then it would make you want to attack it, and if it was a player's, it would provide vision.

Edit: I tried the "Exactly" and it did not remove the problem. I think iv had issues with exactly before, so iv been using at most or at least for everything that can be a range. (I wont put at most 2 at least 2, for example, but the rest of the time I use those)



None.

Sep 3 2010, 11:44 am Azrael Post #4



You have some misconceptions about how the editor works.

1) I did not say the problem was associated with using "At Most" instead of "Exactly".

Quote from Azrael.Wrath
It's because you're creating the mineral field for Neutral Players instead of Current Player.

This is the problem.

2) Mineral fields do not work like normal units, they are not owned by the player you create them for. No players can "get vision" from them or will "attack" them.

3) You have not had any problems from using "Exactly". "At Most" is the problematic condition, and can cause unexpected results. It is not the cause of this problem, but it could be the cause of a future one. "Exactly" and "At Least" work exactly the same way as one another as far as detecting units goes.

Unless you expect to somehow have a negative number of units at a location, using "At Most" to detect them is both unnecessary and potentially problematic.




Sep 3 2010, 12:18 pm sraw531 Post #5



based on the last ten minutes of me trying to fix it, first by making it use current player - Now i cant get it to shut up. It used to be that when it spawned, it would spawn 3, now it cant even see that it has spawned and keeps trying. I will persist.

I "think" it has been fixed. Thank you for assisting.

'case you care, it now looks like this:
Quote
Trigger("Player 8"){
Conditions:
Bring("All players", "Mineral Field (Type 1)", "2", Exactly, 0);
Elapsed Time(At most, 1500);
Deaths("Current Player", "Mineral Field (Type 1)", Exactly, 0);

Actions:
Create Unit("Current Player", "Mineral Field (Type 1)", 1, "2");
Comment(" - - - Resources - - -");
Modify Unit Resource Amount("Current Player", 4, 0, "sm1-12");
Set Deaths("Player 8", "Mineral Field (Type 1)", Set To, 16);
Preserve Trigger();
}


Edit2: After removing the "Add deaths", it still works.

Post has been edited 2 time(s), last time on Sep 3 2010, 12:32 pm by sraw531.



None.

Sep 3 2010, 12:38 pm Azrael Post #6



Glad it's working for you ^^ If you have any more problems, just ask.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[07:32 pm]
Zoan -- I got $2000 bonus. I would like 2000 minerals, please
[2026-4-16. : 4:15 am]
DarkenedFantasies -- you eat lots of beans
[2026-4-16. : 3:46 am]
IskatuMesk -- how do i get gas
[2026-4-15. : 11:43 pm]
Moose -- you don't
[2026-4-15. : 10:06 pm]
Zoan -- how do i get minerals
[2026-4-14. : 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
Please log in to shout.


Members Online: Tirade, akirasmith435