| 06-08-2003, 04:54 PM | #1 |
hi, i need to make a trigger that makes a unit destroy any trees that it sees but doesn't havest them and get lumber. There's something similar in the WC3:ROC game in the carverns of the oracle, where theres a lizard that just keeps on eating trees, it's called the hungry hungry lizard. could you help me please? |
| 06-08-2003, 05:13 PM | #2 |
Guest | hmmm...you could try something like setting the life of the trees to 1 (either after time elapsed is 1 second, after a unit enter the region where the trees are) then have a trigger that does: ---Trigger 1--- event: //you decide, maybe enter region X..? action: issue order - order unit to harvest a random picked destructable doodad in region X action: set player property wood to ((player property wood) - 1) that might work, this is off the top of my head though, so it might not... at the least maybe it'll give you an idea. good luck |
| 06-08-2003, 05:19 PM | #3 |
problem would be that it'd keep returning to the town hall to drop off lumber, which i dont want it to do, plus it might choose the tree furthest away from it, which i don't want, cos it'll take too long! thx anyway |
| 06-08-2003, 05:25 PM | #4 |
Just destory the tree? |
| 06-08-2003, 05:58 PM | #5 |
give the unti the ability to attack trees, but not to harvest lumber. make unti attack doodad or somthing, its a unit - issue order targeting an object action i think. |
| 06-08-2003, 06:23 PM | #6 |
I looked at the Hungry Hungry Lizard triggers and they are HUGE. Just go to My storage site and download the Orc Campaign. Then It's Orc7 map. |
| 06-08-2003, 07:09 PM | #7 |
thx I might have found an easier way of doing it, using a region that constaly moves with the unit, ill give it a shot anyway! |
| 06-08-2003, 07:22 PM | #8 |
I think it works even more easily, if you just add trees to the targets of the attack. Think of workers. If you order them to ATTACK the trees instead of harvest, they don't gather the lumber. |
| 06-08-2003, 07:38 PM | #9 |
like infernals i ntree tag. make em attack the darn trees! |
| 06-08-2003, 09:32 PM | #10 |
Here it is! The simplified hungry hungry lizard trigger(s) Trigger 1 - this trigger sets up our region variable On map installation: Set region(region variable)=Region centered at (Position of(Lizard)) with size (512,512) Trigger 2 - this trigger ensures it is always on top of the lizard every 0.5 seconds: Move Region- Center region(the variable) on (Position of(Lizard)) Trigger 3 - This trigger makes sure that the Lizard attacks the trees every 2.00 seconds If region contains (position of random destructible doodad) = true order unit lizard to attack (random destructable doodad in region) Trigger 4 - This trigger is to ensure that he doesn't attack any dead trees Every 0.10 seconds If (destructable doodad in region)is dead=true Remove matching destructable doodad Whew! That was a tricky one! Thanks to everyone who helped out and if you got any questions, PM me |
| 06-08-2003, 09:38 PM | #11 |
Cant you just give them the ability to attack ground like ballistas and catapults? Maybe I'm stupid and don't understand the question but thats my idea. |
| 06-08-2003, 09:58 PM | #12 |
Could something be done with the "eat tree" ability? |
| 06-09-2003, 08:15 AM | #13 |
I had to find a trigger that made the lizard do it of its own accord, so you just make it walk to the trees and it starts eating them. I have set it to attack only trees, and the code i posted above works |
