| 02-06-2004, 09:17 PM | #1 |
I need a sytem to make so each time you make a tower the cost of all towers of that kind increase by 1. I made this trigger, and ive been troubling with it for 2 hours now. Sometimes the tower doesnt start building, even if i have like 20 gold and only 1 burrow placed (shud cost 11 then)... plz read this and check for any faults i made: Tower Cost Increase Code:
Events
Unit - A unit Begins construction
Conditions
Actions
-------- Burrow --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Constructing structure)) Equal to Burrow (td)
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Constructing structure)) Current gold) Greater than or equal to (10 + (Number of units in (Units in P1 Area <gen> matching ((Unit-type of (Matching unit)) Equal to Burrow (td)))))
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Constructing structure)) Equal to Player 1 (Red)
Then - Actions
Player - Set Player 1 (Red) Current gold to ((Player 1 (Red) Current gold) - (Number of units in (Units owned by Player 1 (Red) of type (Unit-type of (Constructing structure)))))
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Constructing structure)) Equal to Player 2 (Blue)
Then - Actions
Player - Set Player 2 (Blue) Current gold to ((Player 2 (Blue) Current gold) - (Number of units in (Units owned by Player 1 (Red) of type (Unit-type of (Constructing structure)))))
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Owner of (Constructing structure)) Current gold) Less than (10 + (Number of units in (Units in P1 Area <gen> matching ((Unit-type of (Matching unit)) Equal to Burrow (td)))))
Then - Actions
Unit - Remove (Constructing structure) from the game
Player - Add 10 to (Owner of (Constructing structure)) Current gold
Else - Actions
Else - Actions |
| 02-06-2004, 09:52 PM | #2 |
That doesn't look too complicated, but can you use the CODE tags so that it formats it like it does in the Trigger Editor? That'll help us figure out which If/Then/Else's apply to what. |
| 02-07-2004, 05:59 AM | #3 |
Ok hope that helps. Well im not noob, i think this is quite simple too... but i just cant figure why it doesnt build when i HAVE more gold then 10 + number of burrows. Regions: P1 Area = All area that ONLY player 1 can enter. Dont worry about 2 having burrows here P2 Area = Same but player 2 |
| 02-07-2004, 03:24 PM | #4 |
Kejos, next time, talk to me on MSN. Not only am I swedish, as you, but you'd also get your problems solved faster. You'd not need to waste ppls time here. And well, you'd save some space on WC3C ;). I'm expecting someone else to look over this, so I decided not to. Regards Dead-Inside |
| 02-07-2004, 10:13 PM | #5 | |
Seems like you could move "If - Conditions (Unit-type of (Constructing structure)) Equal to Burrow (td)" to the Conditions section, since it has no Else, and everything in the trigger is contained inside it. That'll clean up the trigger a bit. Also, it looks like you subtract gold from the constructing player, no matter which one it is, so you don't need to separate that out. Just say "subtract 10+x gold from constructing player's gold". The line Quote:
I really don't care for the green and blue. They're much too dark on the dark gray background. Is that a change on this forum? It's neat to have it recolor the information similar to the editor, but if you can't read it easily, it's worse. Silly forum-runners. Anyway, see what happens with those changes, if you're willing. |
| 02-08-2004, 04:16 AM | #6 |
Nope, its supposed to be the type of constructing unit. Like if you have 2 burrows a burrow cost 10 (10 x amouint) Well the problem is that sometimes when you have around 5 gold more then needed, like you have built 5 burrows and try to build one (and have 20 gold), then it doesnt build. It thinks i dont have more gold than it, so i dun get it... plz help |
| 02-09-2004, 02:02 AM | #7 |
What I was saying was that, in the line I quoted above, you refer to Player 2, then Player 2, then Player 1, and I think you wanted the last Player 1 to be Player 2 still. |
