Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Create Unit creating too many?
Create Unit creating too many?
Mar 4 2009, 3:01 am
By: bri_guy636  

Mar 4 2009, 3:01 am bri_guy636 Post #1



Im trying to finish up a long overdue defense map (my first), and I have some triggers that go like:

if
player 6 brings 1 hatchery to xxx
countdown timer is exactly 2 seconds
then
create 1 infested terran at location xxx for player 6
preserve trigger

This trigger is only selected for player 6, and creates 4 infested terran for the player.
There are no hypertriggers in my map (that only increases the amount created), and no waits in any triggers.

This is also an issue when I attempt to create following trigger system:

trigger 1:
current player kills at least 10 men // modify score for current player add 1

trigger 2:
current player kills at least 20 men // modify score for current player add 1
etc...

trigger x:
current player custom score is 1 // create 1 civilian at location xxx for current player + subtract 1 custom score from current player +preserve trigger

This creates 2 or so civs for the player

Any ideas on this? This is really killing my map

Thanks in advance

Post has been edited 1 time(s), last time on Mar 4 2009, 3:12 am by bri_guy636.



None.

Mar 4 2009, 3:05 am Moose Post #2

meme

Quote from bri_guy636
if
current player score kills = 10
then
subtract 10 from current player score kill
create 1 civilian at location xxx for current player
preserve triggere
Current player score kills? What is the score killing? :P

Seriously, though, I have no idea if you're using
Score("Current Player", Kills, At least, 10) -- (correct)
or Kill("Current Player", "Terran Goliath", Exactly, 2); -- (incorrect)

And the subtraction should be:
Set Score("Current Player", Subtract, 10, Kills);

You really should copy/paste from a text trigger editor so you're as clear as possible. Or attach the map. (You can PM it to me if you don't want everyone having it.)



None.

Mar 4 2009, 3:10 am bri_guy636 Post #3



Ok that was off my bad memory, I have

trigger 1:
current player kills at least 10 men // modify score for current player add 1

trigger 2:
current player kills at least 20 men // modify score for current player add 1
etc...

trigger x:
current player custom score is 1 // create 1 civilian at location xxx for current player + subtract 1 custom score from current player +preserve trigger

made more clear i hope



None.

Mar 4 2009, 3:24 am Moose Post #4

meme

I can't really think of anything without seeing the map unless you accidentally preserved the triggers to add custom score.




Mar 4 2009, 4:27 am Falkoner Post #5



The issue is that you are using Kills, and not Kill Score for the condition, if you are using Kill Score, then the issue is that you are thinking Kill Score is the same as kills, but it is not, each unit has a certain number of points they award, a list is here.

The issue with Kills is that you can't subtract from it, so you need to use Kill Score instead.



None.

Mar 4 2009, 1:55 pm NudeRaider Post #6

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

Quote from bri_guy636
Im trying to finish up a long overdue defense map (my first), and I have some triggers that go like:

if
player 6 brings 1 hatchery to xxx
countdown timer is exactly 2 seconds
then
create 1 infested terran at location xxx for player 6
preserve trigger
Without hyper triggers the triggers are checked every 2 seconds so it may well be that you check at 3s and at 1s of the countdown timer, but not when it's exactly 2s.
- Either add a trigger with a condition for exactly 1 second,
- or use hyper triggers (this is recommended especially for the kills-to-cash methods) and subtract one for countdowntimer (or it would fire 8 times in that second)
- or change the condition to at most 2s.

This trigger is only selected for player 6, and creates 4 infested terran for the player.
There are no hypertriggers in my map (that only increases the amount created), and no waits in any triggers.

Yeah and as was already said make sure you know the difference between kills score and kills. Read them up in the wiki and then check the wiki for kills-to-cash methods to read up on how to do it correctly and learn about alternative methods. The wiki gives you pros and cons of every method, so you might even find a more suitable method for your map.

Post has been edited 1 time(s), last time on Mar 4 2009, 6:36 pm by NudeRaider.




Mar 4 2009, 4:30 pm bri_guy636 Post #7



Thank you for the help everyone,

After doing some homework on SC triggers learning that:

The infested terran spawning issue was due to the trigger being set to all players, even though it only created 1 for player 6, it created 4 (the amount of players in game at the time) due to it firing 4 times. I am now learning triggers on all players are best avoided all together if possible, and they fire for every player even if it is only listed once under all players and not under individual players.

The civ spawning was a similair situation.

Thank You all again,
5 years of messing around in editor, took me long enough huh?



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[04:05 pm]
NudeRaider -- DarkenedFantasies
DarkenedFantasies shouted: you eat lots of beans
:lol:
[11:30 am]
NudeRaider -- I would like 3000 minerals, please
[2026-4-16. : 7: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
Please log in to shout.


Members Online: O)FaRTy1billion[MM], JohnnyTheWolf, RIVE