HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

need help with a trigger

08-08-2004, 10:39 PM#1
MELK()R
hi, i need help with this trigger


Events
Conditions
Actions
Unit - Kill Hero Selection 0004 <gen>
Unit - Kill Circle of Power 0022 <gen>
Unit - Kill Circle of Power 0021 <gen>
Unit - Kill Circle of Power 0020 <gen>
Unit - Kill Circle of Power 0019 <gen>
Unit - Kill Circle of Power 0018 <gen>
Unit - Kill Circle of Power 0025 <gen>
Unit - Kill Circle of Power 0017 <gen>
Unit - Kill Circle of Power 0024 <gen>
Unit - Kill Circle of Power 0016 <gen>
Unit - Kill Circle of Power 0023 <gen>
Trigger - Destroy (This trigger)

i need the trigger to destroy these when all players have chosen a hero from the tavern (hero selection), there will be 12 available heros with 10 players, just if that's important for the trigger.

If anyone can help, i'd really appreciate it

thx, sorry if this is a noob question, just trying to familiarize myself with the triggers
08-09-2004, 05:39 PM#2
Aelita Lyoko
There is a mpa made by Kyran, the Diablo TD maps. They use a trigger wich utilizes the player's food as the variable for level change.

Prehaps if you take a look at it, you might find what you need.
08-09-2004, 05:56 PM#3
wwsage
Well when a player picks a hero it could give him food, and i think you can run a trigger to check if all players have so and so much food, then delete the things.

Code:
Food check
    Events
        Player - Player 1 (Red)'s Food used becomes Less than or equal to 5.00
    Conditions
    Actions
        Unit - Kill blahblahbah

I just used less than or equal too 5 because it's just an example, it can be whatever you want. You can also you a bunch of If/then/elses to check which player has the current food and to detroy their selection thingie.

Im sure theres some way to make this into a simple loop, but I'm not 100% positive how to do that ;/
08-09-2004, 10:54 PM#4
Rafael Br
This trigger will do it:
Events: Every 0.50 seconds on the game
Actions: For each integer A do 1 to 10 actions
Loop - actions
If - Unit group (units owned by player integer A matching matching unit is a Hero equal to true) is empty then do nothing or else set PlayersReady(integer variable) = PlayersReady + 1
If PlayersReady is greater than or equal to 10 then (put your stuff here, don't forget to turn of or destroy the trigger) or else do nothing.
08-10-2004, 02:50 PM#5
MELK()R
thx for all your help, next question, what would i do to make it all currently connected players are counted instead of 10?
08-10-2004, 03:14 PM#6
Rafael Br
You will have to make a trigger like this, make it run on map initialization.
For each integer A do 1 to 10 actions
Loop - If Player Integer A slot status equal to is playing then set PlayersPlaying(integer variable) = PlayersPlaying + 1 or else do nothing
Then on the last trigger part (the second if\then\else), put this instead:
If PlayersReady is equal to PlayersPlaying then (put your stuff here, don't forget to turn of or destroy the trigger) or else do nothing.
You don't need to check if the player integer A is playing on the loop of the previous trigger, because if they are not playing, they will not have a hero.
08-11-2004, 03:07 AM#7
MELK()R
wow thx a lot :)