Staredit Network

Staredit Network -> UMS Assistance -> Triggers colaspeing on itself
Report, edit, etc...Posted by JordanN_3335 on 2006-07-19 at 14:33:22
Ok but first look at this trigger them im trying to fix
[Players]
1,2,3,4,5,7 (player 7 is computer)

[Conditions]
Player-7 brings at exactly 1 Dropship to Location "1337 death"

[Actions]
Kill all Dropships
Create 1 "Civ" at create civ p-1 for player 1
create 1 "Civ" at create civ p-2 for player 2
create 2 "Civ" at create civ p-3 for player 3

But now when I started the map it creates "2" civs at the location for each player even though its one. But I revised over the trigger and heres the weird part. First I thought that I could put remove 1 "civ" at "location" to prevent the double creating of the civs but made it worse....... it removed all. Does anyone know a solution to this or to make it short what did I do wrong which spawned 2 civs when I wanted it to be 1.
Report, edit, etc...Posted by Killer_Kow(MM) on 2006-07-19 at 14:35:35
Make a seperate trigger for each player.
Report, edit, etc...Posted by MindArchon on 2006-07-19 at 15:03:15
Just have one trigger for one player.

The trigger is executing for every player in the game, probably player 7 and player 1.
Report, edit, etc...Posted by -bilal92- on 2006-07-19 at 15:28:42
seperate triggers or maybe if u selected players 1-7 and then u also selected the same force say if players 1-6 was force one and u selected players 1-6 and force 1, cause that would double the trigger
Report, edit, etc...Posted by Electroid on 2006-07-19 at 15:31:27
first of all... the trigger is executing twice, because player 1 (human player i assume) and player 7 both run the same trigger at the same time. that explains why you are getting 2 civs.

to solves this problem, simply take player 7 out of the [Players]
the trigger will still understand the condition, therefore the trigger will work.
Report, edit, etc...Posted by Killer_Kow(MM) on 2006-07-19 at 16:24:17
QUOTE(Electroid @ Jul 19 2006, 04:31 PM)
first of all... the trigger is executing twice, because player 1 (human player i assume) and player 7 both run the same trigger at the same time. that explains why you are getting 2 civs.

to solves this problem, simply take player 7 out of the [Players]
the trigger will still understand the condition, therefore the trigger will work.

[right][snapback]526937[/snapback][/right]


This will NOT work if you have more than one player in the game.

And no need to repeat the same thing 3 times, people, once is enough.
Report, edit, etc...Posted by JordanN_3335 on 2006-07-19 at 18:13:10
QUOTE
[Players]
1,2,3,4,5,7 (player 7 is computer)

[Conditions]
Player-7 brings at exactly 1 Dropship to Location "1337 death"

[Actions]
Kill all Dropships
Create 1 "Civ" at create civ p-1 for player 1
create 1 "Civ" at create civ p-2 for player 2
create 2 "Civ" at create civ p-3 for player 3


Electroid how can i take player-7 out!?! Read that it says that player-7s dropship is what starts up the actions but when I then later checked for some unknown reason the game spawned 2 civs for each player even though the trigger says one and im asking on how to fix that "not" the players. Also the dialouge is in the actions so what more can I do to make it spawn only 1 "civ" for the players excluding player 7 because thats the comp.
Report, edit, etc...Posted by TheHappyHobo on 2006-07-19 at 23:32:28
QUOTE(JordanN @ Jul 19 2006, 05:12 PM)
Electroid how can i take player-7 out!?! Read that it says that player-7s dropship is what starts up the actions but when I then later checked for some unknown reason the game spawned 2 civs for each player even though the trigger says one and im asking on how to fix that "not" the players. Also the dialouge is in the actions so what more can I do to make it spawn only 1 "civ" for the players excluding player 7 because thats the comp.
[right][snapback]527049[/snapback][/right]


The player the trigger affects doesn't really have anything to do with the condition. You can have a trigger that applies to player 1 but only happens when player 2 brings a certain unit to a location. For example, you want a message to appear whenever player 2 gets close to player 1's base. That would look something like:

null
Trigger
Players:
¤ Player 1
Conditions:
¤ Player 2 Brings at least 1 any unit to "Player 1's base"
Actions:
¤ Display text Message for current player: "Player 2 is in your base!"


This way, the text message is only displayed to player 1, but player 2 is the one who actually makes it happen.
When multiple players are affected by a trigger, the trigger occurs for each player currently playing the game. If a trigger that creates a unit applies to All Players, and there are 6 players currently playing, 6 units will be created. It's very annoying and it has happened (I'm sure) to just about all of us every now and then. You fix it by making the trigger apply to only one player.
Sorry for the length of this post... crazy.gif
Report, edit, etc...Posted by Electroid on 2006-07-20 at 00:39:25
QUOTE
Electroid how can i take player-7 out!?! Read that it says that player-7s dropship is what starts up the actions but when I then later checked for some unknown reason the game spawned 2 civs for each player even though the trigger says one and im asking on how to fix that "not" the players. Also the dialouge is in the actions so what more can I do to make it spawn only 1 "civ" for the players excluding player 7 because thats the comp.


are you telling me you want player 7 to spawn a civ??? you are not making any sense man. at least try this... apply the trigger to player 1 ONLY. then, if you need to, repeat the trigger for other players, but don't attatch more than 1 player to a CreateUnits trigger.

QUOTE(TheHappyHobo @ Jul 20 2006, 01:32 PM)
The player the trigger affects doesn't really have anything to do with the condition. You can have a trigger that applies to player 1 but only happens when player 2 brings a certain unit to a location.


as i was saying, take player 7 out. the condition is still recognized even though it involves player 7. make a seperate trigger for each player it applies to. the [Players] selection in triggers, doesn't neccessarily mean you have to apply it to all the players the trigger involves. it simply means that only the players selected will execute the following actions.
Report, edit, etc...Posted by Urmom(U) on 2006-07-20 at 00:53:49
Just taking player 7 out of the trigger won't completely solve his problem. I'm surprised that nobody suggested using current player? Try this:

[Players]
1,2,3,

[Conditions]
Player-7 brings at exactly 1 Dropship to Location "1337 death"

[Actions]
Kill all Dropships
Create 1 "Civ" at create civ p-1 for current player
Report, edit, etc...Posted by Zeratul_101 on 2006-07-20 at 00:54:53
that won't work, it'll only fire for one player, cause you're destroying the condition with your actions.
Report, edit, etc...Posted by Urmom(U) on 2006-07-20 at 01:00:01
Are you sure? I'll have to test that tomorrow then.
Report, edit, etc...Posted by Zeratul_101 on 2006-07-20 at 01:01:26
has to do with trigger order. unless starcraft was completely redone in the last 24 hours.
Report, edit, etc...Posted by Urmom(U) on 2006-07-20 at 01:04:35
I didn't think that applied to triggers owned by multiple players. Well I'll test tomorrow so that everyone can find out. biggrin.gif
Report, edit, etc...Posted by Zeratul_101 on 2006-07-20 at 01:14:17
does that make a difference? blink.gif isn't having multiple owners equilevant to having each owner having the trigger individually?
Report, edit, etc...Posted by Urmom(U) on 2006-07-20 at 01:20:07
Yes but with less triggers. And I just thought of something, if he said that it created more units than he wanted it to, then how would that be possible based on your theory. The trigger wouldn't be able to run multiple times for the other players to run the trigger again and create the excess units because the conditions wouldn't be met.
Report, edit, etc...Posted by Electroid on 2006-07-20 at 01:22:37
[Players]
1

[Conditions]
Player-7 brings at exactly 1 Dropship to Location "1337 death"

[Actions]
Kill all Dropships
Create 1 "Civ" at create civ p-1 for player 1

at least try this out before replying. thanks.
Report, edit, etc...Posted by Zeratul_101 on 2006-07-20 at 01:49:54
well, what do ya know
QUOTE(Zeratul_101 @ Jul 19 2006, 11:01 PM)
starcraft was completely redone in the last 24 hours.
[right][snapback]527265[/snapback][/right]


in otherwords, you're right urmom. although having indivual triggers and 'group' triggers produce the exact same effect. i really don't see how this is possible, i've had many triggers that relied on trigger order that have worked beautifully.



i even looked at blizzard's FAQ:

Every two seconds the entire list of triggers will be executed. When this happens the triggers will be checked in the order that they are listed in the Trigger Menu -> Players tab. That order is

Player 1
Player 2
Player 3
Player 4
Player 5
Player 6
Player 7
Player 8

ADDITION:
and i'm pretty sure this test was done right.

trigs are owned individually right now. its easier to go from indiv to group than vice versa.
Report, edit, etc...Posted by Kenoli on 2006-07-20 at 02:17:09
Let me give you guys some concrete information.

Clearly the trigger that creates one civ is activating twice, once for the human player and once for the computer, because they both own a copy of the trigger.

The obvious question: "The dropship was killed by the first trigger, how can the second trigger activate?"
The Kill action does not immediately kill units, they are actually killed after the trigger cycle is over. You can detect units that have been killed this way for the remainder of the trigger cycle. The dropship is still "alive" when the second trigger's conditions are checked.

The solution: Use remove instead of kill. Units that are removed are deleted instantly, and cannot be detected later.
The other "solutions" are just work-arounds. They may appear to work, but they do not address the actual problem.
The kill action is the problem, not the trigger order.

QUOTE
Every two seconds the entire list of triggers will be executed. When this happens the triggers will be checked in the order that they are listed in the Trigger Menu -> Players tab. That order is: Player 1 Player 2 Player 3 Player 4 Player 5 Player 6 Player 7 Player 8 All Players Force1 Force2 Force3 Force4
Ignore this order, it is wrong.
Triggers execute from Player 1 to Player 8. There is nothing else.
The Forces and "All Players" are not legitimate trigger owners. When you select any of these, the triggers are simply assigned the the corresponding players.
For example: Checking "All Players" is equal to checking P1, P2, P3, P4, P5, P6, P7, and P8 individually.
Report, edit, etc...Posted by Zeratul_101 on 2006-07-20 at 02:22:49
thanks for clearing that up kenoli, i knew there was nothing wrong with trigger order. i totally forgot about the time delay or deaths. i know about the forces, etc. and how they relate but i was copying and pasting so i didn't even think about making a note of that or removing it.

if you really want the death animation, you would just remove the P7 unit, create a unit for p8(just not p7), and then kill it.
Report, edit, etc...Posted by Kenoli on 2006-07-20 at 02:28:54
QUOTE(Zeratul_101)
if you really want the death animation, you would just remove the P7 unit, create a unit for p8(just not p7), and then kill it.
You can give it to another player before you kill it. Avoiding the secondary triggers but still having the explosion. Like this:
Trigger
Conditions:
¤ (Condition)
Actions:
¤ Give '1' 'unit' owned by 'Player 1' at 'location' to 'Player 2'.
¤ Kill '1' 'unit' for 'Player 2' at 'location'.

Report, edit, etc...Posted by JordanN_3335 on 2006-07-20 at 13:19:15
Thanks to Mp)Rue he fixed the trigger along with devilesk.
This is what he or she changed.

[players]
Players 1,2,3,4,5,8 and 7(comp)

[Condition]
Player 7 brings exactly 1 "Dropship" to crash copter

[Actions]
Remove 1 dropship at crash copter
Create one "Civ" a "Create civ" for current player

So there you have it.
Report, edit, etc...Posted by Urmom(U) on 2006-07-20 at 13:32:41
QUOTE(urmom @ Jul 20 2006, 12:53 AM)
Just taking player 7 out of the trigger won't completely solve his problem.  I'm surprised that nobody suggested using current player?  Try this:

[Players]
1,2,3,

[Conditions]
Player-7 brings at exactly 1 Dropship to Location "1337 death"

[Actions]
Kill all Dropships
Create 1 "Civ" at create civ p-1 for current player
[right][snapback]527260[/snapback][/right]

... that is what I posted earlier. Well at least you fixed your problem.
Report, edit, etc...Posted by Mp)Trance on 2006-07-20 at 13:44:23
QUOTE
MindArchon
Just have one trigger for one player.

The trigger is executing for every player in the game, probably player 7 and player 1.


^ He understood the problem. ^


QUOTE
Killer_Kow(MM)
This will NOT work if you have more than one player in the game.

And no need to repeat the same thing 3 times, people, once is enough.


^ He also knows what hes talking about ^
Report, edit, etc...Posted by Kenoli on 2006-07-20 at 15:15:43
I've discovered some new information regarding removing units.
I said eariler that units that have been removed could not be detected later, but that's not completely true. Apparently removed transport units can still be detected.
Units that can be detected this way are: Dropships, Shuttles, Upgraded Overlords, Hero Overlords, and Bunkers.

PS. When I say "detected later" I mean later during the trigger cycle that the unit was removed in, not just any time later on in the game.

Also let me correct myself, the solution I posted eariler won't actually work, because the unit being removed is a transport unit.
If it were any other type of unit, it would work.
Next Page (1)