| 03-08-2004, 12:58 AM | #1 |
Okay I have 2 triggers going, the first works fine and is this: E: Player - Player 1 (Red)'s Current gold becomes Not equal to (Real((Player 1 (Red) Current gold))) A: Set TeamOneGoldUNIT = (Player 1 (Red) Current gold) And the second, which doesn't work is this: E: Unit - A unit Sells a unit C: (Owner of (Buying unit)) Equal to Player 10 (Light Blue) A: Player - Set Player 10 (Light Blue) Current gold to TeamOneGoldUNIT The main problem is that without the condition, it works, so really the problem must lie in: C: (Owner of (Buying unit)) Equal to Player 10 (Light Blue) Any ideas on what could be making this happen? Also yes this is for buying mercs and I have separate variables for wood as well but that isn't important, the condition is. Thanks. -------------------------------------------- Another interesting thing I have is similar triggers except that the event "unit sells a unit" is "unit sells an item (from shop). With the condition, the 2nd works fine, with the condition, the first doesn't. Perplexing? |
| 03-08-2004, 01:20 AM | #2 |
My gut instinct (what a wierd phrase) tells me your error lies in the Code:
E: Player - Player 1 (Red)'s Current gold becomes Not equal to (Real((Player 1 (Red) Current gold))) If the second trigger is working up to the action, then maybe it's just not working because the event in the first is never being met...? What type of Variable is it? A unit variable? ... I don't see how it could be a unit variable though, because you're setting it to an integer... hmm... |
| 03-08-2004, 01:27 AM | #3 |
That makes no sense though because the problem only occurs when the condition is met, and I need a condition to designate when player X buys the unit, so it doesnt give the gold to him when player Y does it... Its a integer based on the player property his gold. |
| 03-08-2004, 01:55 AM | #4 |
So, let me try to understand what you're doing before I attempt to help you. You're trying to set Player 1 (red)'s current gold to an integer variable. Then, when Player 10 (light blue) buys a unit, you want to set the Player 10's gold to whatever Player 1's gold is? If that's what you're doing, then it sounds like it'd all work fine. The condition is perfect, I don't see what could be wrong with it. It's the "Event" on the first trigger that looks wrong. Don't you see? If the first trigger's event doesn't ever activate, then how can it set the amount of Player 1's gold to a variable? And if it doesn't set, then how can it set Player 10's gold to that variable if the variable itself has no value? If I am misunderstanding the purpose of your trigger, please enlighten me as to what you're trying to accomplish with it... -Edit, also, I'd suggest putting in a Code:
Game - Display text message to all players for 5 seconds |
