• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Wisp Gather Lumber

Status
Not open for further replies.
Level 28
Joined
Feb 18, 2014
Messages
3,580
Normally, what you need to do here to blighten the tree is to simply change the race of the wisp/worker to Undead, however, the wisp's harvest lumber ability is different than the others, so you either have to give the wisp a different harvest ability like the peasant harvest ability for example, Although, this will break the wisp's work animations, or you can create a dummy undead worker unit and order it to harvest the tree when the wisp is issued to target it, it may be complicated since there isn't any easy way to detect when a tree is harvested/attacked.
 
Level 28
Joined
Feb 18, 2014
Messages
3,580
One can fake the tree model with a unit instead but that means he will have to create another wood gathering system, or he can periodically check the HP of the tree but then again you can't tell if this latter is attacked or harvested... Both methods seem complicated to me but that's all you can do for now unless Blizzard adds a event to detect when a tree is damaged in future patches.
 

Bribe

Code Moderator
Level 50
Joined
Sep 26, 2009
Messages
9,464
@Bribe could you make a DDS for destructibles :D?
Not currently possible with WarCraft 3. You can set a timer to check when a destructible loses health, and you can track when a unit is issued an order targeting a destructable, but you could not know if a Mortar Team (for example) splash-damage-damaged a tree.

We'll wait and see what Reforged brings to the table in terms of modding capability. My stuff is all on hold until I know what's coming.
 
Level 9
Joined
Sep 20, 2015
Messages
385
You can detect when a unit is given an order that has a destructable as a target. If the order is harvest, the unit is a whisp and the destructable is a tree, then you can set the target destructable to a variable(target destructable = harvestedtree, if within x seconds the health of the harvestedtree changes then it has been harvested.
You can blight a tree if you blight the terrain beneath it. When you have detected the tree that has benn harvested you can set the terrain to blight in the tree coordinates and then change it back to normal.
 
Status
Not open for further replies.
Top