[Solved] How to use selection circle models to represent range

Status
Not open for further replies.
Wc3 has some assets available for simple circles/selection circles, namely:

Code:
UI\FeedBack\Target\Target.mdx
UI\FeedBack\TargetPreSelected\TargetPreSelected.mdx
UI\Feedback\selectioncircle\selectioncircle.mdx
UI\Feedback\SelectionCircleEnemy\SelectionCircleEnemy.mdx
UI\Feedback\SelectionCircleHero\SelectionCircleHero.mdx
UI\Feedback\SelectionCircleUnit\selectioncircleUnit.mdx

The sizes of them are odd. How would I use one of them to represent an ability or tower's range?
 
It depends on the model because they're not all the same, and have some different properties. "Target.mdx" fades out. "selectioncircle.mdx" does not disappear immediately when destroyed, etc.

When working with "Target.mdx", the model's scale is off from its radius by about a factor of 50. So to represent a circle with radius 200, use a model scale of 200 / 50 = 4.0

Here's some sample code using "Target.mdx" in wurst:

Wurst:
package Example

import UI


init
    // Target.mdx is elevated from the origin by about 50.
    let offset = -50.

    // For a circle with radius 200, use 200 / 50.
    let desiredScale = 200 / 50.

    addEffect(UI.target, ZERO2.withTerrainZ(-50.))..setScale(desiredScale)
 
Last edited:
Status
Not open for further replies.
Top