• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] lumber removal systerm

Status
Not open for further replies.
Level 6
Joined
Aug 13, 2008
Messages
197
Hi, i got a problem regarding harvesting lumbers from trees.
currently, i got a unit which is able to harvest lumbers BUT i do not want it to return the lumber to me. basically i like a skill which function like harvesting lumber ie; slowly chopping the tree down and move to another tree without returning the lumber.
would appreciate anyone who is able to help me out and preferably in GUI since i dont know JASS. thank in advance
 
Level 18
Joined
Sep 27, 2005
Messages
2,069
You could make the unit that is chopping that he attacks the tree, and then a trigger when any tree dies orders the unit who killed it to go attack the nearet tree.

you would need to improve this with conditions and everything. but I think something like this

Destructible - A destructible within (Playable map area) dies
Unit - Order (Attacking unit) to Attack (Random destructible in (Playable map area))
 
Level 8
Joined
May 21, 2008
Messages
218
How bout this Make the trees targetable by attack on your harvesting unit in object editor. Then make an ability harvest on your harvester using spell channel. Then in trigger do
  • event-unit casts an ability
  • condition-ability being cast = channel
  • action-set temp_unit = closest tree(use a get closest unit jass script modified for trees)
  • order unit to attack closest tree
Next

  • event-destructible dies
  • condition-destructible type = your tree
  • action-order killing unit to attack closest tree
Something along those lines. I didnt actually make a trigger that was all in my head. For jass script search it in the jass section.
 
Level 6
Joined
Aug 13, 2008
Messages
197
What about setting the lumber return-rate to the maximum value. And i believe in that ability there is how much lumber the unit will take with each hit, set that to 0?

i think u mean lumber capacity and damage to tree as there isnt lumber return-rate nor lumber the unit will take with each hit. ps. changing damage to trees to 0 will cause the spell to fail.

i will try to help first tell me how much of those workers will have around the map

well it actually 1 per player so 9 in total. Btw i use hero to clear the trees instead.
 
Level 9
Joined
May 30, 2008
Messages
430
when there are only 9 units make dummy lumber mills and order them to fallow the harvester and then the harvester will return tree to lumber mill that will be next to him any time ask some one to make it for u if u can't becouse i reinstall my pc and i will install warcraft after new year
 
Level 6
Joined
Aug 13, 2008
Messages
197
when there are only 9 units make dummy lumber mills and order them to fallow the harvester and then the harvester will return tree to lumber mill that will be next to him any time ask some one to make it for u if u can't becouse i reinstall my pc and i will install warcraft after new year

the problem is that i do not want the lumber. Having lumber mill belonging to allies will not make the worker deposite the wood there and having it to be owned my the player would make him gain the wood.
 
Level 9
Joined
May 30, 2008
Messages
430
then make worker to can carry 999999999999999999999999999 wood and every hit to take 1 wood and it's ok :ugly:


and event dying destructable work for all destructables but if u make revive system work for first few that die or somthing like that
 
Level 6
Joined
Aug 13, 2008
Messages
197
then make worker to can carry 999999999999999999999999999 wood and every hit to take 1 wood and it's ok :ugly:

and event dying destructable work for all destructables but if u make revive system work for first few that die or somthing like that
i think u mean lumber capacity and damage to tree as there isnt carry 999999999999999999999999999 wood and hit to take 1 wood
that caused me to gain 999999lumber after 25 hits.

the second seem ok. but i am not sure if it wont fail. anyway i settle for that =p
thx and....
+ rep all.
pity rep is devalued by competitions where they give insane amt of rep. making +rep from help worthless
 
Status
Not open for further replies.
Top