Get the Desktop App for Battle.net Now
- All your games in 1 place
- Log in once
- Automatic game updates
How do I change the scale of the selection ring (the green ring that appears around a unit when your mouse is over it) and offset the selection area (the area where you are able to select the unit when you click it) without changing the scale of the model?
The selection circle radius for a given unit can be quickly modified in its Model Data under Art: Selection Radius.
Changing the selection area of the model as you're describing is not as trivial. The selection information is actually embedded in the model with a group of invisible selection geometry that dictates its selectability for click and drag selection.
One option to modify selectability is to attach another model to your actor at the scale you need and use it for selection. As a quick test, I just created a new ModelAdditionStatic actor for the Marine and it worked pretty well, so I'll give that as an example from the Data module (F7):
First, let's create a new model entry:
Next, we'll set up the actor for this model:
Finally, we'll modify the Marine to use our new Model/Actor:
Then just place a Marine on your map and test it - your Marine should be normal, except that it now has a giant, invisible secondary marine attached at its Origin which provides much more click and drag selection area than the standard model. You can dial in the actor scale that we set to 5 on your MarineSelector actor to fine tune the selection size.
After doing this, I've realized that mapmakers would benefit from some plain selection-geometry-only models in a few shapes that they can use for this purpose rather than duplicating real game models. I'll explore adding that support for Heart of the Swarm.
Let me know if you have any questions or problems with this, and if anyone has more elegant solutions for this that you've worked out, please call them out as this is not something we encounter when making StarCraft II. That said, there will probably be some unintended fallout from my solution as well that may need further solves.
Edited by Xuzaca on 11/20/2012 5:56 PM PST
I was able to change the radius of the selection circle, but it is still too thick. Is there anyway to change the thickness of the ring? As for the selection area, I used a battlecruiser actor, for my unit and it has a lot of events already placed in the Events tab. So should I replace the events that are there, delete all of the battlecruiser events and add the new events, or just add the events to the bottom of the list. What I did was replace the events, but I didn't try anything else. As for what I've done so far, and I think I did the things correctly, all I've accomplished was changing the unit's scale.
My unit is a enlarged D-8 Charge with the scale of (20, 20, 60) and the selection area is way to tall, so when you click above it onto the ground behind the unit, it still selects the unit, making the selection area seem offset, but the rest of the selection area is okay. Would doing what's mentioned above help reduce the scale, or is it just overlapping the original selection area and adding extra selection area, which in this case, would still leave the original selection area, affecting nothing?
FYI: The unit is spawned once per player by triggers at the beginning of the game, and cannot be created any other way.
Edited by FrozenFire on 11/23/2012 10:00 AM PST
Xuzaca's simple example assumed enlarging the select area. In the actor for your D-8 charge, if you go to Art: Model Flags and uncheck "Allow hit test", this will make the base actor completely unclickable. Then using Xuzaca's method you can completely define the select area rather than just expand on it. At least, I think "Allow hit test" being off won't be inherited. If you actually can't get a select this way at all, you could reverse the relation of the two actors. That is, give the unit your selection model and 0 opacity, and attach the unclickable D-8 model for visual purposes.
I'm having a hard time figuring out why this selection ring would be extra thick. You can set a number of selection ring properties on a global basis in Game UI Data, but if this one unit has a unique problem, there must be something else influencing it. Sometimes fields I'm looking for turn out to have been right under my nose, so I'll take another look later.
Edited by TheFed on 12/4/2012 10:53 AM PST
Threats of violence. We take these seriously and will alert the proper authorities.
Posts containing personal information about other players. This includes physical addresses, e-mail addresses, phone numbers, and inappropriate photos and/or videos.
Harassing or discriminatory language. This will not be tolerated.