I have a unit with a ranged and a melee weapon, but I wan't it to always attempt to use the melee weapon over the ranged weapon.
The ranged weapon has fire on the move enabled, and It will use both when in melee (which is correct) but will always stop at range and use the ranged weapon without trying to close to use the melee weapon
You could fake the ranged weapon by attaching a periodic search effect that fires a projectile, albeit you lose the ability to target it. That way the unit will close in to melee with its (only) weapon while still firing a ranged attack.
There's also a weapon scan range for the melee weapon, try making it as long or longer than the other weapon's range and see if that helps.
I tried reducing the scan range for the ranged weapon to 0. It didn't work.
The idea was the increase the scan range of the melee weapon to be longer than the range of the ranged weapon, not the other way around, but I don't expect it to work anyway.
oh. Ok wouldn't that still interrupt a unit's orders. (If they are attack moving to a distant point and encounter an enemy, they would be ordered to move to said enemy and then not return to attack moving to the distant point)
EDIT: nevermind, I just checked the Issue Order effect and there is a preempt option. I'll try that next. Thanks
I have a unit with a ranged and a melee weapon, but I wan't it to always attempt to use the melee weapon over the ranged weapon. The ranged weapon has fire on the move enabled, and It will use both when in melee (which is correct) but will always stop at range and use the ranged weapon without trying to close to use the melee weapon
You could always use an Issue Order effect on a Switch effect to order the unit to move next to the target.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
Is there a way to do it without interrupting the units orders?
Use a set effect with the range weapon else use a validator to disable the range weapon until in melee range if melee is an option.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
what do you mean by a set effect with the range weapon?
I can't disable the ranged weapon because I want it to fire it at ranged but still close to melee
You could fake the ranged weapon by attaching a periodic search effect that fires a projectile, albeit you lose the ability to target it. That way the unit will close in to melee with its (only) weapon while still firing a ranged attack.
There's also a weapon scan range for the melee weapon, try making it as long or longer than the other weapon's range and see if that helps.
I might end up using the periodic search effect. Not being able to target is fine, as this is on computer creeps.
I tried reducing the scan range for the ranged weapon to 0. It didn't work.
@Grasshopper721: Go
The idea was the increase the scan range of the melee weapon to be longer than the range of the ranged weapon, not the other way around, but I don't expect it to work anyway.
I mean weapon effect uses a set with the move closer stuff validated based on proximity to the target.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
oh. Ok wouldn't that still interrupt a unit's orders. (If they are attack moving to a distant point and encounter an enemy, they would be ordered to move to said enemy and then not return to attack moving to the distant point)
EDIT: nevermind, I just checked the Issue Order effect and there is a preempt option. I'll try that next. Thanks
Else you could disable the ranged weapon every so often after shooting forcing it to move into melee.
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg