How do I choose my unit's target - not attack

How do I choose my unit's target - not attack

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

Post Reply
Epicentre
Posts: 9
Joined: 25 Jul 2011, 11:04

How do I choose my unit's target - not attack

Post by Epicentre »

Hello.

Sometimes I want to choose a unit's target but without using "Attack".

For example I have a fatboy moving from point A to point B. Some enemies attacks it. I still want a "Move to point B" order on top of my fatboy order queue, so I won't issue an "Attack" order that would clear it. But I still want to choose his target. The need is obvious: I want my fatboy to shoot in the middle of the pack, not on that isolated scout far away from anything else.

I couldn't find any shortcut or script to do that. Any help out there?
User avatar
Petah
Posts: 426
Joined: 13 Jan 2008, 19:40

Re: How do I choose my unit's target - not attack

Post by Petah »

set the unit to hold fire, then set it to attack the enemy/location

that way it wont attack anything else except what you told it to
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: How do I choose my unit's target - not attack

Post by Jazcash »

Epicentre wrote:Hello.

Sometimes I want to choose a unit's target but without using "Attack".

For example I have a fatboy moving from point A to point B. Some enemies attacks it. I still want a "Move to point B" order on top of my fatboy order queue, so I won't issue an "Attack" order that would clear it. But I still want to choose his target. The need is obvious: I want my fatboy to shoot in the middle of the pack, not on that isolated scout far away from anything else.

I couldn't find any shortcut or script to do that. Any help out there?
Yup, I wanted this for a long time too, then Dizekat made a delightful little widget that allows you to insert commands into your queue without breaking the queue using spacebar. I simply set my unit(s) to move to the position I want them, then insert the attack commands in there and they go ahead and attack and move at the same time ^_^

If you do it right, you can even use this widget to allow your com to dgun and move at the same time too without using fps mode :)
Epicentre
Posts: 9
Joined: 25 Jul 2011, 11:04

Re: How do I choose my unit's target - not attack

Post by Epicentre »

Jazcash wrote: Yup, I wanted this for a long time too, then Dizekat made a delightful little widget that allows you to insert commands into your queue without breaking the queue using spacebar. I simply set my unit(s) to move to the position I want them, then insert the attack commands in there and they go ahead and attack and move at the same time ^_^

If you do it right, you can even use this widget to allow your com to dgun and move at the same time too without using fps mode :)
Mmm sounds good. I found it and will give it a try. I'll give a feedback ASAP.

FEEDBACK on that widget: the thing it does is something I already scripted by myself. But not what I'd like: if I insert an attack order at queue[1] then my fatboy stops moving while attacking the enemy, and will also follow it through the whole map if it's a scout.

What I really want is to designate the target for the "Fire at Will" state while my unit is still walking to it's destination. I already browsed tons of lua scripts to find this, I think it's something that should be implemented in Spring. A feedback function maybe like:
widget:ChooseTargetForWeapon(myUnitId, myUnitWeaponId, targetUID)

Also anyway thank you for your help, much appreciated.
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Re: How do I choose my unit's target - not attack

Post by yuritch »

This sounds like something that should be done game-side (but afaik no engine changes are required, this functionality can be done in gadgets + unit scripts - there are some settings which change targeting priority 'on the fly'). Widgets alone can't do such things.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: How do I choose my unit's target - not attack

Post by Pxtl »

Iirc, even games can't implement this without horrible hacking. We went over it before. It needs to be an engine-feature.

However (and this may be out-of-date info) units *do* prefer targeting their last attack target. So if you attack something and then move, they'll give prioritiy to shooting the thing you told them to "attack".
Post Reply

Return to “Help & Bugs”