• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Solved] Purely cosmetic wood gathering spell

Status
Not open for further replies.
Level 2
Joined
Dec 15, 2019
Messages
11
Hello folks !

I want to create a spell very similar to the vanilla ability Gather which allows, as everyone knows, a peasant to gather wood (and gold but it's not important there). But I want this spell to be purely cosmetic. I want my peasants to go to the nearest tree, to hit it with their axes, to go back to the lumber mill and to do it again but without giving any lumber to the player (purely cosmetic).

I am looking for an answer for 4h now and I know how to use Jass so don't hesitate to give me complicated leads.

Thanks in advance !

[EDIT]

Here is what I've already tried :
  • Set the Damage To Tree to 0 and/or the Wood Capacity to 0 (The peasant can no longer target the trees)
  • Create a trigger which detects when a tree is attacked (There is no A Destructable is attacked event)
 
Last edited:
Hello !

Sadly I already tried that. The minimum value of this input is 1
Plus I tried to set the "Wood capacity" of the ability to 0 but the peasant can just no longer use the ability on the trees

[EDIT] I added the "What I've already tried" to the main topic
 
Last edited:
The minimum value of this input is 1

You can put larger and smaller numbers on the field by holding down Shift when clicking, and putting 0 is quite possible. However, that ends up the peasant not ever getting its cargo full, so the pile never appears on the his shoulder and neither does he ever go to his Town Hall to return the lumber.

Anyway, gathering can be quite tricky to manipulate, since there are no trigger events for it and the conditions are not very accurate if you try to get which unit returns or gathers the resource. Maybe make the peasants be actually owned by another player and then just change their color so that they look like they belonged to right player?
 
Try this :
  • Cosmetic Lumber System
    • Events
      • Unit - A unit comes within 270.00 of Lumbermill 0003 <gen>
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Peasant
      • (Current order of (Triggering unit)) Equal to (Order(resumeharvesting))
    • Actions
      • Unit - Replace (Triggering unit) with a Peasant using The old unit's relative life and mana
      • Unit - Order (Last replaced unit) to Harvest Nearby Lumber
 
Your idea is very interesting Warseeker !

Sadly, it would'nt have worked with what I planned to do. I started on a completly different system to replace this one as it seems to be unfeasible.

But thanks for your help ! (And I'm glad I learned that shift-clic trick, Sabe, thanks a lot !)
 
Status
Not open for further replies.
Back
Top