- Joined
- Feb 2, 2006
- Messages
- 1,630
For my mod/map I want to make trees or other big doodads (could also be destructibles if I had to replace them) transparent when a unit stands behind/near them.
What I have found about it is this and this.
In my map the trees are doodads and not destructables at the moment. Since the occlusion doesn't have anything to do with the transparency according to one of the posts and the occlusion works only for destructibles I am thinking about doodad animations.
My questions are now:
Is it the best way to make trees transparent when units get near it by adding a transparency animation to the tree model and playing it when the unit gets near?
If so how do I easily add such animations to a large number of tree models?
If so how do I write the vJass code? Periodic checks and
for all trees or any range events?
What alternatives or existing systems are there?
edit:
Related JASS functions I've found:
What I have found about it is this and this.
In my map the trees are doodads and not destructables at the moment. Since the occlusion doesn't have anything to do with the transparency according to one of the posts and the occlusion works only for destructibles I am thinking about doodad animations.
My questions are now:
Is it the best way to make trees transparent when units get near it by adding a transparency animation to the tree model and playing it when the unit gets near?
If so how do I easily add such animations to a large number of tree models?
If so how do I write the vJass code? Periodic checks and
JASS:
SetDoodadAnimation()
What alternatives or existing systems are there?
edit:
Related JASS functions I've found:
JASS:
native ShowDestructable takes destructable d, boolean flag returns nothing
// these have nothing to do with transparency?
native EnableOcclusion takes boolean flag returns nothing
native GetDestructableOccluderHeight takes destructable d returns real
native SetDestructableOccluderHeight takes destructable d, real height returns nothing
native SetDoodadAnimation takes real x, real y, real radius, integer doodadID, boolean nearestOnly, string animName, boolean animRandom returns nothing
native SetDoodadAnimationRect takes rect r, integer doodadID, string animName, boolean animRandom returns nothing
// if I use units which I should not according to a post
native SetUnitVertexColor takes unit whichUnit, integer red, integer green, integer blue, integer alpha returns nothing