Well, this is how I have solved that in my upcoming RPG scenario:
TRIGGER 1 - Starts ON - NOT Looped
CONDITION - Object Selected (the building)
CONDITION - Accumulate Attribute (gold 100 or whatever)
EFFECT - Tribute (100 gold from p1 to p2 (for example))
EFFECT - Tribute, Create Object, Research Tech (Whatever you want to happen)
When you click on the building, TRIGGER 1 is started. It checks if you got the right amount (In this case 100 gold), and if you do, it tributes the amount to the other player (p2) and give the human player whatever you want. If you want it to be possible to buy the thing multiple times, do like this instead:
TRIGGER 1 - Starts ON - Looped
CONDITION - Object Selected (the building)
CONDITION - Accumulate Attribute (gold 100 or whatever)
EFFECT - Tribute (100 gold from p1 to p2 (for example))
EFFECT - Tribute, Create Object, Research Tech (Whatever you want to happen)
EFFECT - Activate Trigger (TRIGGER 2)
EFFECT - Disable Trigger (TRIGGER 1)
TRIGGER 2 - Starts OFF - Looped
CONDITION - Timer (5)
EFFECT - Activate Trigger (TRIGGER 1)
EFFECT - Disable Trigger (TRIGGER 2)
This trigger system does exactly as the prevoriously trigger did, but after it has done that, it starts another trigger, and disables itself. The other trigger then got a timer, and after that timer has enden, the first trigger is activated agian, and the second trigger is disactivated. This is because the user should have a chance to remove the selection and not spend all of the money. If he/she leaves the object selected in 5 seconds, the tribute will take place again. This is useful for stuff like food for example.If you got many places where you can buy food for example, you still don't need more than one "Trigger 2". This is an example of where there is 3 markets where you can buy food:
TRIGGER 1 - Starts ON - Looped
CONDITION - Object Selected (red market)
CONDITION - Accumulate Attribute (gold 10)
EFFECT - Tribute (10 gold from p1 to p2)
EFFECT - Tribute (6 food from p2 to p1)
EFFECT - Activate Trigger (TRIGGER 4)
EFFECT - Disable Trigger (TRIGGER 1)
TRIGGER 2 - Starts ON - Looped
CONDITION - Object Selected (green market)
CONDITION - Accumulate Attribute (gold 10)
EFFECT - Tribute (10 gold from p1 to p3)
EFFECT - Tribute (6 food from p3 to p1)
EFFECT - Activate Trigger (TRIGGER 4)
EFFECT - Disable Trigger (TRIGGER 2)
TRIGGER 3 - Starts ON - Looped
CONDITION - Object Selected (yellow market)
CONDITION - Accumulate Attribute (gold 10)
EFFECT - Tribute (10 gold from p1 to p4)
EFFECT - Tribute (6 food from p4 to p1)
EFFECT - Activate Trigger (TRIGGER 4)
EFFECT - Disable Trigger (TRIGGER 3)
TRIGGER 4 - Starts OFF - Looped
CONDITION - Timer (5)
EFFECT - Activate Trigger (TRIGGER 1)
EFFECT - Activate Trigger (TRIGGER 2)
EFFECT - Activate Trigger (TRIGGER 3)
EFFECT - Disable Trigger (TRIGGER 4)
It uses quite a few triggers, but not as many as I've seen other systems do! Hope you've got any help of all this!
------------------
quote:
There is no stupid questions, just stupid people
[This message has been edited by David (edited 01-02-2000).]