| 04-14-2004, 09:07 AM | #1 |
I need some help with triggers for a map. First I need help with a victory trigger. I want so that team1 wins when player 9, 10 , 11 and 12 main units die. Same thing just the opposite for team 2. They lose when they lost all their wisps. Players 1-8. And I want to make an orc get 75 gold and a personal message that says "You gained 75 gold" when he/she killed a wisp. I also want death messages example: An Orc Has Died. An Wisp Has Died. I think thats all the questions for now |
| 04-14-2004, 09:12 AM | #2 |
Oh I almost forgot I need help with a leaderboard too. It says if a person is dead, alive, left or "Slot not used". I need a trigger to kill a wisp/orc that aint used by a person and make the leaderboard say "Slot not used". |
| 04-14-2004, 09:23 AM | #3 |
Another question: How to make it night all the time? |
| 04-14-2004, 09:41 AM | #4 |
The first questions are realy simple. Just make a trigger that triggers whenever a wisp dies (generic unit event-a unit dies; unit-type comparison-unit type of dying unit is a wisp) and check if player on the wisp team have any more wisps (integer comparison-count units owned by player). If the number of wisps for every player in one team equals 0, then end the game (game - victory, game - defeat). The gold gain is simple as well. When a wisp dies, use an action "player-add property" to add 75 to the (owner of unit(killing unit))'s current gold. Use the "game-text message" to display the message to the same player. Add another message that displays to all players and says "A wisp has died." Leaderboards are harder stuff, and I haven't done any yet so I really can't explain them; I can explain the "how to determine if a player is in game" part, but it gets harder than what I have written so far. You check if a player is in game like this: use a "melee game-spawn starting units" trigger when the map starts (event: map initialisation). This will spawn a town hall and four peasants (or orc great hall and four peons, or elf tree of life etc...) at the start location. Then run a trigger that checks for every player if those units are there, and if they are, remove just them, and if they aren't, then the player is not in game and you can remove all other units. |
| 04-14-2004, 09:45 AM | #5 |
Thanks !(too short) |
| 04-14-2004, 10:30 AM | #6 |
Another Question: How to limit a player to only have 1 of a unit? |
| 04-14-2004, 10:50 AM | #7 |
An other question: How to kill all units a player owns when he leaves? I don't know how to do this ("Then run a trigger that checks for every player if those units are there, and if they are, remove just them, and if they aren't, then the player is not in game and you can remove all other units") trigger. |
| 04-14-2004, 10:56 AM | #8 |
Another Question: How to make a door get destroyed when it reaches a certain time and how to make a counter for that? |
| 04-14-2004, 04:05 PM | #9 | |
Quote:
Look, this is all very basic stuff. I can't write the triggers for you, so you must learn something by yourself as well. Also, don't spam replys, if you have another question just edit your previous post. I already explained how you detect if a player controls any units of a type when I was saying how you would check if any player still had any wisps. Use a similar solution here. You must know how to implement what you learn in other places, or you haven't really learned anything. So, just go under scenario - player propreties and lock all player races so they cannot change them; that way, when the "melee game-spawn starting units" makes starting units, you will know which race those units are (great hall and five peons for orcs, town hall and five peasants for human etc...), so you wont have to check for every race. Now, for an orc player, if you have already placed X great halls, this trigger will place one more at the start location (of course, only if the player is in game) ; now, when the game starts, you check for every player how many great halls he has: if he has (X+1) great halls, then this means that the player slot is full, if he has X great halls, then the player slot is empty; if the player slot is empty, you want to remove all other units that you placed for that player from the game: you do that with "unit group - pick every unit in (units in region (playable map area) owned by player(the player you are checking)) and do actions" "loop actions - unit - remove (picked unit) from the game" If a player leaves later in the game, you can use the same actions to remove his units, only the event will be different; you would use "player - player leaves game". I don't know what you mean by limiting a player to only have one of a unit; if you mean heroes, that is done with "melee game - limit heroes to 1 per hero type", as for regular units, the first thing that comes to my mind is way too complex to explain to you now. To lock the time to night, use the actions "game - set time of day" and "game - set time of day speed" in a game initialisation trigger. |
