Accumulate Attribute
One of the most versatile conditions is the "Accumulate Attribute", so it should be no surprise why it is used so often by scenario designers. The reason is because not only can goals for resources, such as food or good, be set, other attributes, such as kills or razings, can be used as well. Most of them are self-explanatory, but clever use can produce amazing results with this simple condition. This condition is very simple to use. Just pick the player the condition is for, and then pick the type of attribute to use. For the resources, just pick the number the player needs to gather. Villager population is a count of all the player's civilian units, like Villagers; Kings; and Trade Carts, while military population is the count of all the other Units. Kills and Razings will be determined by how many Units and Buildings a player destroys. The Kill Ratio is the difference between the number of kills and the number of losses a player receives, respectively, and technologies will count how many technologies a player has researched. Another use of the "Accumulate Attribute" condition is the prevention of using cheats. For example, to prevent a player from using the "lumberjack" cheat when the player is not suppose to get any wood, simply create the following trigger: Ever wonder how RPG makers allow a player to receive gold continually for every unit the player kills. It is actually quite simple if you understand the trigger: [This message has been edited by CrystalCrown (edited 07-31-2003 @ 05:10 PM).]
Display as Objective: No
Trigger Starting State: On
Trigger Looping: Yes
Condition: Accumulate Attribute ( 1000 Wood: Player 1 )
Effect: Tribute ( 1000 Wood: Player 1 » Gaia )
Note that this trigger can be displayed as an objective, and the starting state can be changed. This trigger will tribute 1000 wood from Player 1 to GAIA every time Player 1 gains 1000 wood. Keep in mind, however, that this is only applicable in games where the player cannot get, by regular means, more than 1000 wood. The same can be done with the other three resources as well.Display as Objective: No
Trigger Starting State: On
Trigger Looping: Yes
Condition: Accumulate Attribute ( 1 Kill Ratio: Player 1 )
Effect: Tribute ( 10 Gold: GAIA » Player 1 )
Effect: Create Object ( ANY UNIT: ANY AREA )
Effect: Kill Object ( ANY UNIT )
This trigger gives 10 gold to Player 1 every time Player 1 kills a unit, but how does it work? Well, at the beginning, Player 1's kill ratio is at zero. Once he kills a unit, however, his kill ratio becomes ( one minus zero ) one, and GAIA gives Player 1 the gold. However, at that time, another unit is created somewhere else and then immediately killed. Now, Player 1's kill ratio is back at ( one minus one ) zero. This process can then be repeated indefinitely. The reason kills do not work is that the number of kills each player receives is stored as one number during the entire game. If Player 1 kills a unit, his kill count will be one, but if he kills another unit, his kill count will be two. There is no way to reduce a player's kill count. The only way would be to create a trigger manually for every single kill! To be even more professional, replaceEffect: Tribute ( 10 Gold: GAIA » Player 1 )
withEffect: Tribute ( -10 Gold: Player 1 » GAIA )
This will eliminate the "GAIA paid 10 gold in tribute to you." message.
CRYSTALCROWN
Play Online — Because you really can't gloat about beating the computer.
Learn the Flush — So you don't lose every game in under 20 minutes.
It's not a post count; it's making your posts count.