- Joined
- Jan 9, 2005
- Messages
- 2,124
Rrrright, so this is a question I asked before, but for some reason replicating the same instructions bugged out... mostly because GetClosestWidget doesn't seem to work anymore?
I'm trying to make a unit harvest a tree (all done via triggers), and once the harvesting is complete, the unit picks the nearest tree and repeats. I copied the code for GetClosestWidget and IsDestructableTree, but when I save with JNPG (5d), it tells me this:
I'm also encountering some weird issues like the target tree not dying. I'm using Eat Tree as my base spell to target the tree, and store that tree in a variable with the custom value of the havester. The custom eat tree is removed and channeling ability is added to be ask when the harvester moves over the tree. When the channeling finishes, the tree is destroyed and lumber is harvested. Kill destructible doesn't seem to work though. I'm using Bribe's Unit Indexer.
Concerning the GetClosestWidget, I need it to pick up the nearest tree that isn't dead. Preferably a tree that isn't already being targeted/worked on by another harvester.
I'm trying to make a unit harvest a tree (all done via triggers), and once the harvesting is complete, the unit picks the nearest tree and repeats. I copied the code for GetClosestWidget and IsDestructableTree, but when I save with JNPG (5d), it tells me this:
I'm also encountering some weird issues like the target tree not dying. I'm using Eat Tree as my base spell to target the tree, and store that tree in a variable with the custom value of the havester. The custom eat tree is removed and channeling ability is added to be ask when the harvester moves over the tree. When the channeling finishes, the tree is destroyed and lumber is harvested. Kill destructible doesn't seem to work though. I'm using Bribe's Unit Indexer.
Concerning the GetClosestWidget, I need it to pick up the nearest tree that isn't dead. Preferably a tree that isn't already being targeted/worked on by another harvester.