| 05-26-2005, 04:59 AM | #1 |
I need this thing where every five kills from a player, they get a villager that they can sacrafice to the gods. I also need this trigger that i forgot how to do (DAMMIT!) where when the villager enters the sacrificing area, they die and a leaderboard, multiboard-whatever its called shows the amount of sacrifices required unitl the god is content. What i mean is say the god requires 10 sacrifices, there will be a board that tells you and each time a villager goes into the region, the number on the board decreases. When the sacrifices are successfully made, the board is destroyed and the god gives a reward. |
| 05-26-2005, 11:43 AM | #2 |
Make a integer array variable and a leaderboard array and a init trigger like this: I use a additional integer variable, that way is faster. Code:
Melee Initialization
Events
Map initialization
Conditions
Actions
Leaderboard - Create a leaderboard for (All players) titled Sacrifices left:
Set LeadB = (Last created leaderboard)
For each (Integer A) from 1 to 6, do (Actions)
Loop - Actions
Leaderboard - Add (Player((Integer A))) to LeadB with label (Name of (Player((Integer A)))) and value 10And when a unit dies: Code:
Player Kills
Events
Unit - A unit Dies
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Owner of (Killing unit)) Equal to Neutral Hostile
// Put any computer that this system does not count on
Then - Actions
Skip remaining actions
Else - Actions
Set Integer = (Player number of (Owner of (Killing unit)))
Set Kills[Integer] = (Kills[Integer] + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Kills[Integer] Equal to 5
Then - Actions
Set Kills[Integer] = 0
Unit - Create 1 Villager for (Owner of (Killing unit)) at (Center of (Playable map area)) facing Default building facing degrees
Else - ActionsWhen Villager enter region: Code:
Villager Enter
Events
Unit - A unit enters Region 000 <gen>
Conditions
(Unit-type of (Entering unit)) Equal to Footman
Actions
Leaderboard - Change the value for (Owner of (Entering unit)) in LeadB to ((Position of (Owner of (Entering unit)) in LeadB) - 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Position of (Owner of (Entering unit)) in LeadB) Equal to 0
Then - Actions
Game - Display to (All players) the text: ((Name of (Owner of (Entering unit))) + has won!!!!)
// Put more wining code here if you like
Else - Actions |
| 05-26-2005, 02:42 PM | #3 |
Ok most of that stuff makes sense but how do i make a trigger when the sacrifices become 0, the gods gives something? |
| 05-26-2005, 04:46 PM | #4 |
If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions (Position of (Owner of (Entering unit)) in LeadB) Equal to 0 Then - Actions Game - Display to (All players) the text: ((Name of (Owner of (Entering unit))) + has won!!!!) // Put more wining code here if you like Here you can put code to be executed when the sacrifices become 0 // Else - Actions |
