Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Spawns too many units
Spawns too many units
Jan 3 2008, 7:18 am
By: Gold_Member  

Jan 3 2008, 7:18 am Gold_Member Post #1



Alright well I need help again yay, what I'm doing is having 4 areas where units spawn using the same trigger:

Condition:
Player1 brings exactly 1 scv to "start"

Action:
Create 5 Scvs at "P1 spawn" for Player 8
Create 5 Scvs at "P2 spawn" for Player 8
Create 5 Scvs at "P3 spawn" for Player 8
Create 5 Scvs at "P4 spawn" for Player 8
Create 1 Marine at "Starter" for Player 1

But when I have the trigger set up like this I end of with 3x the amount of units I want at all of the locations, so I get 15 Scvs at "P1 Spawn" "P2 spawn" "P3 spawn" and "P4 spawn" and then I end up with 3 Marines at the "Starter" location, I'm thinking im not allowed to do this and must create seperate triggers for each? Or is there a way I can do this to save time with triggers :P



None.

Jan 3 2008, 7:57 am ejac1337 Post #2



What player is it set under? If it's under a force or multiple people, switch it to just 1 person (i.e. player 8) and see if that solves the problem.



None.

Jan 3 2008, 8:06 am Gold_Member Post #3



Quote from Ejac
What player is it set under? If it's under a force or multiple people, switch it to just 1 person (i.e. player 8) and see if that solves the problem.

Ah, see I thought I would need Player 1 as a player as well because of the "Create 1 Marine at Starter", and players 2-4 +8 because of the players involved, but you were right I had more then just player 8 selected, which was all I needed and now I'm back on track hooray!, Thank you so much! I knew it was something simple xD



None.

Jan 3 2008, 8:10 am ejac1337 Post #4



Quote from Gold_Member
Quote from Ejac
What player is it set under? If it's under a force or multiple people, switch it to just 1 person (i.e. player 8) and see if that solves the problem.

Ah, see I thought I would need Player 1 as a player as well because of the "Create 1 Marine at Starter", and players 2-4 +8 because of the players involved, but you were right I had more then just player 8 selected, which was all I needed and now I'm back on track hooray!, Thank you so much! I knew it was something simple xD
Good, easy fix :). You can generaly only use multiple people under a trigger that creates units if it is set to "current player", not "player (1-8)".



None.

Jan 3 2008, 9:04 am Gold_Member Post #5



Alright, thanks again!



None.

Jan 3 2008, 12:43 pm Gold_Member Post #6



Quote
Good, easy fix :). You can generaly only use multiple people under a trigger that creates units if it is set to "current player", not "player (1-8)".

Ok, nevermind it was working while I was just testing the map by myself, but when I play with more people (4 players) it spawns about 30 more units then I want, here let me show you the new trigger.

(with Current Player selected the trigger doesn't even work, with Force 1 selected it works, but it spawns like 50 more units then I want. But I also need the Display text "bla bla bla" to show up for Force 1 but if I put it at P8 it won't show for them. I'm completley stuck now :><: Help Please!!! :-( )

Players:
Current Player

Condition:
P1 brings exactly 1 scv to "Start"

Actions:
Kill 1 Scv for P1 at "Start"
Kill 1 Scv for P7 at "lvl 1" (this justs shows the levels on map and kills each unit after level)
Create 1 Marine for P1 at "Starter"
Display current message "bla bla bla"
Create 10 Scvs at "P1 spawn" for P8
Create 10 Scvs at "P2 spawn" for P8
Create 10 Scvs at "P3 spawn" for P8
Create 10 Scvs at "P4 spawn" for P8
Comment: level 1



None.

Jan 3 2008, 4:38 pm who Post #7



If it's for multiple people, and the condition is P1 brings 1 scv to start, of course it'll spawn extra, because every player has that trigger occur when P1 brings scv to the location. Turn all "P1"s into "Current Player", and it should work.
If you want everyone to see a text message, add this action:

Set switch 1

then for the force that sees it

C:
switch one is set
A:
display text msg blablabla
clear switch 1

that should work



None.

Jan 3 2008, 5:48 pm Falkoner Post #8



You just need to make one of the conditions false inside the trigger, otherwise it will run once for each player, but if it runs once for a player, then one of the conditions is made false, then it won't run for the others.



None.

Jan 3 2008, 6:12 pm who Post #9



OH, i see what you want.
Make that trigger for P8, and set a switch for displaying text like i showed earlier.



None.

Jan 3 2008, 7:59 pm NudeRaider Post #10

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 Gold_Member
Players:
Current Player

Condition:
P1 brings exactly 1 scv to "Start"

Actions:
Kill 1 Scv for P1 at "Start"
Kill 1 Scv for P7 at "lvl 1" (this justs shows the levels on map and kills each unit after level)
Create 1 Marine for P1 at "Starter"
Display current message "bla bla bla"
Create 10 Scvs at "P1 spawn" for P8
Create 10 Scvs at "P2 spawn" for P8
Create 10 Scvs at "P3 spawn" for P8
Create 10 Scvs at "P4 spawn" for P8
Comment: level 1
Current Player can't own triggers. You should consider it a bug in ScmDraft 2 that you are able to select it as owner.
Try to follow the logic:
Fact: Current Player is the player that currently executes the trigger.
But if Current Player owns the trigger there is never a player to be found that is atm executing the trigger because the trigger engine is atm trying to find a owner and is not already executing the trigger. Thats why it runs for no player.

As someone09 said, give the trigger to P8.

Adding a condition - as Falk said - is possible but less efficient. Because you got more players checking more conditions and doing more actions as would be needed.

Quote from someone09
OH, i see what you want.
Make that trigger for P8, and set a switch for displaying text like i showed earlier.
Setting a switch is a problematic suggestion because it is global and thus has to be reset after ALL players have executed their triggers. Waits may even interrupt the process.

It's strongly recommended to set a death counter for every human player that should receive a message on a global event (like P1 brings a scv to 'start').

You can use one death counter 'msg' for EVERY message in the game. Set it to 1 for Force1 on the first text, set it to 2 for Force2 on the 2nd text, and so on.
Then make triggers owned by Force1 that check for exactly 1 of dc 'msg' -> display text1 -> set dc 'msg' to 0 for current player
and for exactly 2 of dc 'msg' -> display text2 -> set dc 'msg' to 0 for current player
and so on.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[11:05 pm]
Ultraviolet -- :wob:
[03:55 pm]
Zoan -- :wob:
[10:34 am]
NudeRaider -- SEN doesn't rely on spammers initiate its sleep cycle. It hat fully automated rest and clean-up phases. Please understand that this is necessary for the smooth operation of the site. Thank you.
[2024-5-18. : 3:45 am]
Sylph-Of-Space -- Does the shoutbox get disabled when there's spammers?
[2024-5-17. : 6:47 am]
NudeRaider -- lil-Inferno
lil-Inferno shouted: nah
strong
[2024-5-17. : 5:41 am]
Ultraviolet -- 🤔 so inf is in you?
[2024-5-17. : 4:57 am]
O)FaRTy1billion[MM] -- my name is mud
[2024-5-17. : 4:35 am]
Ultraviolet -- mud, meet my friend, the stick
[2024-5-16. : 10:07 pm]
lil-Inferno -- nah
[2024-5-16. : 8:36 pm]
Ultraviolet -- Inf, we've got a job for you. ASUS has been very naughty and we need our lil guy to go do their mom's to teach them if they fuck around, they gon' find out
Please log in to shout.


Members Online: Roy