How do you make a trigger that happens if Player 1 goes to location A to get a marine, but if Player 2 goes to Location A, Player one doesn't get the marine?
You Have To use the condition 'PLAYER 1 Brings' and it will work... as in like a defense game, with unit beacon choosing
What if Player 2 gets there before Player one, how do you cancel the player 1 trigger?
Use 'switch'
Conditions:
Always
Actions:
Switch 'A' is set.
Conditions:
Player 1 brings at location A any unit.
Switch 'A' is set.
Actions:
Give to player 1 marine
Conditions:
Player 2 brings at location 'A' any unit.
Actions:
Clear switch 'A'
SMile, I don't understand that...
What I want is When player one gets to Location A he gets the Marines, but if Player 2 gets there before him, the marine dies, and How do you use a switch?
Player 1 must do 2 conditions: Bring... when switch 'A' is set, if player 2 comes in location early than player 1 switch will cleared (disabled) and after that Player 1 wouldnt get unit in location 'A'.
If in that location was unit before smbd move any unit at it you simple do this:
Conditions:
Player 1 bring any unit at location 'A'
Actions:
Give any unit owned by Player X at location 'A' to player 1.
Conditions:
Player 2 bring any unit at location 'A'
Actions:
Kill (or remove) all units owned by player X at location 'A'
or
Give any unit owned by Player X at location 'A' to player 2.
Thanks alot SMILE that really explained it...
Now to continue working on my project...
You can set and un-set switches. But, do switches only work once if you don't put a preserve trigger?
Seems a little over the top to me, if you want it so either can get the marine, or just the first to reach it?
Or do you want it so that they will recreate each time A player brings a unit to it.
Simple set the Players in question to all those who will have the option to use it, and then in the
Players:
1, 2 + Etc...
Conditions:
Current Player brings Exactly one unit to locationX
Action:
Move All Units for Current Player at LocationX to LocationY
Create 1 Marine for Current Player at LocationZ
Preserve Trigger
That will work for any involved and produce the result you want, for repeating the procedure. Remember that this way they can keep making them if they go back to LocationX from Location Y, while LocationZ is where the units go that are choosen. Add on the Conditions the costs and such, and in the Actions add the appropiate features for having the money or such taken away and there you go.
For single use only, have it so that it is like this
Players:
1, 2 + Etc...
Conditions:
Current Player brings Exactly one unit to locationX
Deaths for Mineral Patch 1 is 0
Action:
Set Deaths for Mineral Patch 1 to 1
Move All Units for Current Player at LocationX to LocationY
Create 1 Marine for Current Player at LocationZ
This will make it only work once, and for all players involved the first to get their, will do it.
Hmmm. I never really thought about it that way, Cokos. But a friend of mine says that you can still do this whole thing without a Switch. Is it possible? I mean, what I want is when Player 1 get to Location A, I will recieve marines(or whatever, not gonna give out clues) , but if Player 2 gets there first, the units become yours, but you get to see them die, and Player 2 gets units. And when you finally get there, inside Location A, you will not get the units...
I am no good at this... Confusing me...

QUOTE(Gowr @ Aug 7 2004, 12:12 PM)
Hmmm. I never really thought about it that way, Cokos. But a friend of mine says that you can still do this whole thing without a Switch. Is it possible? I mean, what I want is when Player 1 get to Location A, I will recieve marines(or whatever, not gonna give out clues) , but if Player 2 gets there first, the units become yours, but you get to see them die, and Player 2 gets units. And when you finally get there, inside Location A, you will not get the units...
I am no good at this... Confusing me...
From what you said, u don't need any switches in the first place.
If either player 1 or 2 will go to the location so you receive the unit but if it is player 2 who goes there u see the unit die so you don't get them anymore...
Players:
Check Player 1 and 2.
Condition:
Current Player Brings at least one any unit to location Give Marine.
Any Other Action.
Action:
Give all marines to player X (X represents the player you want to give the marines to)
Any Other Conditions.
But if it is player 2 who finds the marines then obviously you set another trigger to kill those marines off.
Player:
Player X
Condition:
Player 2 brings at least one unit to Give Marine.
Action:
Centre View for current player at Give Marine.
Wait for 500 milliseconds
Kill all marines at Give Marine for player X.
Display Text Message: Now player X sees them dead and cannot get them anymore
Understand?
Why are you guys complicating this so much?
First, preplace the Marines in the location.
Players: (Players who can get the Marine)
Conditions: Current Player brings at least 1 Men to "Location"
(Neutral Player) brings at least 1 Marine to "Location"
Actions: Give all "Marine" owned by (Neutral/Comp Player) at "Location" to Current Player.
That's all there is to it.
You don't even need to check if the neutral player has any units there, they will have died already.
Player 2's trigger can then go
Give neutral units to P1
Center view for whoever at location
wait a bit
Kill marines for P1 (this assuming the unit P1 brings will not be a marine, if it is then don't give them to P1 at all. Just kill them. P1 might have come up during the wait time.)
Create marines for P2 can go in there somewhere... depending what you want.
Screwed: Your way will kill P1's marines if he gets there first and then P2 comes running up.. not a good thing I suspect.
dude if you want to only give out ONE marine... listen to mini... otherwise you need to explain it a little better
If you want to give more than one Marine with my method, just place more than one Marine. -_-
its called a switch im not good at explaining thing so if sum1 else hasnt already pm yoshi da sniper of tuxedo templar or mini moose
Thanks for all the advice, but I'm not gonna be able to do anything about the triggers until I'm off from vacation. Cheers!
Gowr
Ok, though mine were for constant recreation, such as a Defense map style, which i thought we were dealing with here, or else follow the advice of Mini, hmm, mine looks complicated because it is less likely to make errors with other parts...Once you start making huge triggered things, you have to stop anything happening that you won't want to happen!
To me it sounds like this would work based on your description.
Force 1:
Conditions:
-Current player brings at least one men to location
-Switch create dude is cleared
Actions:
-Create Marine for current player
-Set Switch 'create dude'
That trigger works once for the first player to get to the beacon. (first come first served).
I find it odd that you ALWAYS explain it as if player 2 gets to the location first player 1 doesn't get the marine. What about if player 1 gets there first, Can player 2 get the marine? I would assume you don't want them to.
And then you have the problem of having it happen again, are you just making a hero, in witch only one player can have it at a time. So another words after it dies do you want a player to be able to get it again.
That trigger would look like this
Force 1:
Conditions:
-Current player brings at least 1 men to location beacon
-Force 1 commands exactly 0 marine
Actions:
-Create one marine for current player
-Preserve trigger.
There are so many ways to interpret your trigger I don't know what you actually want.
Agreed, the most common problem is poor description of the requirement of help needed. What can we do if you don't clearly point to what you want help with, we do our best, but sometimes our techniques are advanced, and may not be completely correct and effects your game badly.
EDIT: Forget what I said it's very simple
Conditions
-Current Player Brings X to Location
Actions
-Create 1 marine for current player
-Any other actions
Thats it, without preserve trigger the trigger can only fire once and if one player gets before the other, the last one won't get the marine.
BeerKeg, if that trigger is just owned by player 1 then it won't work at all for the other players.
If it is just owned by the force, well its is multiple triggers and it can and will fire for each of the players when they go to the beacon. Thus it doesn't solve the problem at all.
Okay, what I wanted was P1 and P2 are on opposite sides. P1 is defending against P2, P2 is attacking P1. There is a spot on the map where P1 can get reinforcements, but the reinforcements could be eliminated by P2 before P1 gets there. What I want is a trigger that activates once for whoever gets there first, P1 or P2. For P1 he will get the reinforcements, of whatever units, but if the P2 gets there before P1 them a transmission, blah blah blah, then P1 will get the reinforcements, but trigger will off the bat, so P1 can't do anything about it. So whoever gets there first either P1: gets units or P2: kills units(by trigger)
Gowr
This is a prime example of switches. Detecting weather or not an event has happened in the past, is the most basic function of a switch. Your triggers would need to look something like this...
Player 1:
Conditions:
-Current player brings at least one SelectionDude to LocationBeacon
-SwitchOne is clear
Actions:
-Create reinforcements at LocationSpot for current player (or any other actions)
-Set SwitchOne
Player 2:
Conditions:
-Current player brings at least one SelectionDude to LocationBeacon
-SwitchOne is clear
Actions:
-Kill all FighterDude for player 1 (or any other actions)
-Set SwitchOne
A switch is a imaginary variable. It has two states Set and Clear, you can change the state by the actions of a trigger. Then you use trigger conditions to reference the state of the switch.
In our example it requires a switch to be clear for the trigger to fire (switches start the game cleared). Once the trigger runs a action sets that switch. So whoever is the next to that beacon won't have there effect happen because the switch is now set and the other triggers conditions are now false.
Hope this helps

PS. Gowr please set your mapmaking skill, if you are a beginner then change it to that, None is intended for people who do not make maps.
So its like a Beacon with a location over it, therefore just have it so that it is set for each player.
Player 1
Conditions:
Player 1 Brings At Least 1 Unit to LocationBeacon
Switch P2Beacon is Cleared
Actions:
Set P1Reinforcements
That should mean that Player 1 can do what he likes, and the P1Reinforcements is just there because i don't know what you would put, so you could just have the reinforcement trigger bit right there, or whatever you want.
Switch P2Beacon is so that it will not work if Player 2 gets there first. Now let us work on that trigger.
Player 2
Condition:
Player 2 Brings At Least 1 Unit to LocationBeacon
Switch P1Reinforcements is Cleared
Actions:
Set P2Beacon
Send Transmission
And whatever you want now...
[Edit]
Mine was done to look simple for you to get, though actually Bolt's is a better use of Switches, i did it this way, so that you could have extra triggers for everything else, incase you wanted breaks and time waits to appear, which are not always friendly in big amounts.