| 11-21-2004, 10:59 PM | #1 |
Ok, here is whats happening. In my Castle Wars Map, a very intergal trigger is malfunctioning. Here is how the two triggers go- The first Event -Map Initilization Action -Add Castle 1 to CastleGroup -Add Castle 2 to CastleGroup (and so on) And the Second Event -Player One Red types message -castle as an exact match Action -Unit, change ownership of random unit from CastleGroup to triggering player and change color. -Set Castle as Ownership Changed Unit -Remove Castle from CastleGroup -Wait 2 seconds -Trigger Turn off -Trigger Destroy |
| 11-21-2004, 11:22 PM | #2 |
Care to tell us how it is malfunctioning? |
| 11-21-2004, 11:25 PM | #3 |
Guest | You should post the real trigger to get better help. Just copy and paste it. Select the top of the trigger (Above "Event") and press Ctrl+Shift+C (To copy as text). Then you can post it here. I think it shows better if you put it into the box. |
| 11-22-2004, 03:50 AM | #4 |
Adding Up Events Map initialization Conditions Actions Unit Group - Add Castle 0032 <gen> to CastleGroup Unit Group - Add Castle 0012 <gen> to CastleGroup Unit Group - Add Castle 0025 <gen> to CastleGroup Unit Group - Add Castle 0031 <gen> to CastleGroup Unit Group - Add Castle 0041 <gen> to CastleGroup Unit Group - Add Castle 0042 <gen> to CastleGroup Unit Group - Add Castle 0043 <gen> to CastleGroup Unit Group - Add Castle 0051 <gen> to CastleGroup Unit Group - Add Castle 0060 <gen> to CastleGroup Wait 2.00 seconds Trigger - Destroy (This trigger) Castle Selector Events Player - Player 1 (Red) types a chat message containing -castle as An exact match Conditions Actions Unit - Change ownership of (Random unit from CastleGroup) to (Triggering player) and Change color Set Castle = (Ownership-changed unit) Unit Group - Remove Castle from CastleGroup Wait 0.15 seconds Trigger - Turn off (This trigger) Trigger - Destroy (This trigger) Ok, the problem is this; whenever somebody types -castle, if someone else has gotten the castle that they randomly select it will change users again, leaving the first person castle-less. This should not happen, however, since the second trigger should remove the ownership changed castle from the group. |
| 11-22-2004, 10:06 AM | #5 |
Guest | The only thing I can see wrong would be this Set Castle = (Ownership-changed unit) It's only for events triggered by "ownership changed". Try this Code:
Castle Selector Events Player - Player 1 (Red) types a chat message containing -castle as An exact match Conditions Actions Set Castle = (Random unit from CastleGroup) Unit - Change ownership of (Castle) to (Triggering player) and Change color Unit Group - Remove Castle from CastleGroup Wait 0.15 seconds Trigger - Turn off (This trigger) Trigger - Destroy (This trigger) Hope this works. |
