• 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.

Scale destructable with triggers

Status
Not open for further replies.
Level 9
Joined
Dec 12, 2007
Messages
489
you can only set destructable scale on creation,
JASS:
native CreateDestructable takes integer objectid, real x, real y, real face, real scale, integer variation returns destructable

so if you mean after creation, then no, you can't as there is no native to do that.
but of course you can just destroy and recreate the destructable to simulate scaling the destructable
 
Level 9
Joined
Dec 12, 2007
Messages
489
Dark_Axl
Or make them act like units with locust.
If I understand right, you suggest to use unit with destructable model with locust ability right?
the drawback of that method would be:
- harder to enum as it will require GroupEnumUnitsOfPlayer enum (if this is a tree)
- can't interact (locust unit lose selectability)
- lose pathing (of course we can use pathing blocker to mimic this behaviour)
- will lag heavily if this were used to simulate a forest (lots of fake destructable)

if the destructable is not used in hashtable or cache,
it would be better if he just remove the destructable, then create a new one scaled at the same position with same parameter.
 
Level 9
Joined
Dec 12, 2007
Messages
489
The problem with this is, that any unit harvesting the tree will "forget" which tree he is harvesting, since technically it will be removed and replaced by another. Any triggers referencing the destructable will also loose reference of it.
Indeed, but have you tried this method about the harvest problem? considering the nature of harvest itself, won't the unit just resume the order by looking for nearby/adjacent tree?

about the trigger problem, yes, that's why I recommend this method if the destructable isn't used with hashtable or cache, maybe I should use word "trigger" for wider meaning. of course another workaround for that trigger problem will be readjust the trigger upon replacement. other than that, for now there is no option to rescale destructable,

or

you can use Daffa the Mage's method
by using dummy unit, but don't add Locust, just
change the ownership to neutral passive,
disable movement and attack, then
set combat - targeted as tree and
add classification tree.

the downside will be the tree is clickable and probably has armor or other unit trait.
 
Status
Not open for further replies.
Top