| 03-25-2004, 11:02 PM | #1 |
Ok this is the trigger that is getting on my nerves i am making a map that is 10 players and 10 heros have leaderboard that shows lives each player gets 3 lives This is greatly getting on my nerves i tryed everyalmsot everything in 3 hours and nothing it should be that once the hero dies it revives instantly near the fountain but it does r3evive but no life reduction witch means the game will never end.. ok the simplest thing i have is give ank of reincarn with 3 charges How could i give it to each unit that aplayer picks and hwo could i put how many charges left ont he leaderboard Thank You :D Any Help Apriciated |
| 03-26-2004, 01:08 AM | #2 |
Event: a unit owned by player(w/e) dies Condition: triggering unit is equal to hero Actions: leaderboard-subract 1 from owner of triggering unit i think its sumthin like that. |
| 03-26-2004, 02:34 AM | #3 |
Event Item-is Manipualted? Condition Item is Anch Action Set Leaderboard # -1 I never work with items, but I guess that should work... If not, check to see if the unit has the item, Anch, in his inventory, if he does, - 1 from the #. |
| 03-28-2004, 01:59 AM | #4 |
[quote=linkmaster23]Event event Item-is Manipualted? [quote] what kind of event is that>? |
| 03-29-2004, 07:43 AM | #5 |
You could probably do something like this: First off, create a Leaderboard variable and a Unit array of size 12 (not really sure if size even matters in WE, meh). You store your heroes inside the unit array with Set Variable, the array number referring to the owner of the hero. So now, to triggering it. Trigger 1 Code:
Create Leaderboard
Events
Map initialization
Conditions
Actions
Leaderboard - Create a leaderboard for (All players) titled Lives Remaining
Set Leaderboard = (Last created leaderboard)
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
Leaderboard - Add (Player((Integer A))) to Leaderboard with label (Name of (Player((Integer A)))) and value (Charges remaining in (Item carried by Hero[(Integer A)] of type Ankh of Reincarnation))
Leaderboard - Hide LeaderboardYou may want to show the leaderboard when all players have chosen their heroes. Just run a trigger whenever someone picks a hero (I don't know how you will let them choose, so I won't give an example), then do an integer comparison. Code:
(Number of units in (Units in (Playable map area) matching ((((Picked unit) is A Hero) Equal to True) and (((Owner of (Picked unit)) controller) Equal to User)))) Equal to (Number of players in (All players controlled by a User player)) As for the action, just turn on the trigger that you see below. Trigger 2 (the updating) - turn this off until the game starts: Code:
Leaderboard
Events
Time - Every 2.00 seconds of game time
Conditions
Actions
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
Leaderboard - Change the label for (Player((Integer A))) in (Last created leaderboard) to (String((Charges remaining in (Item carried by Hero[(Integer A)] of type Ankh of Reincarnation))))Hope that helps. |
