• 🏆 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!

REMOVE BLIGHT ON TREES... HELP ANYONE!

Status
Not open for further replies.
Level 7
Joined
Nov 22, 2004
Messages
192
Hello ! I have read the threads about this subject, but no one found an easy working answer yet. I actually founs a custom script here to destroy, then regrow the blighted trees, but they regrow with the blighted tree model!!! And by the way I blighted the region via a trigger and then removed the blight via trigger, but the trees stay blighted. Would there be a custom script to make them to their unblighted model?

Here is the custom scipt link I used to destroy and regrow.


Basically it was custom script: local destructable BADTREE = GetDyingDestructable()

and custom script: call DestructableRestoreLife( BADTREE,GetDestructableMaxLife(BADTREE), true)

Thanks!
 

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
In my map I remove the trees and recreate them. The newly created trees are not blighted anymore.
 
Level 7
Joined
Nov 22, 2004
Messages
192
In my map I remove the trees and recreate them. The newly created trees are not blighted anymore.
The trees in my map are place very methodically, so I need the to regrown at the same place and ideally with the same size. Remove and recreating trees would be my last solution. Does your trigger in your map answer that issue. If so can you give me an example of your trigger. Thank you!
 

Jampion

Code Reviewer
Level 15
Joined
Mar 25, 2016
Messages
1,327
Here is the relevant file of my map: Jampi0n/BattleRoyale

Does your trigger in your map answer that issue
Only partially. I have a huge list of the tree types I use with their size ranges (e.g. 0.8 - 1.2) and number of variations. This information is used to recreate the trees with normal sizes and variations.
The trees are still created randomly, so they will have different variation and size when they are recreated.

I don't know how many trees you have in your map, but in theory you could save the variation and size for every tree you placed in the map. This is a huge amount of work, because it cannot be done automatically.

Maybe it is possible to change the model and have an alternate form of the tree that always uses blight and the normal form never uses blight. Then you can switch between blight and normal manually using triggers. I don't know how well (if at all) this will work though.
 
Status
Not open for further replies.
Top