HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Can you make a unit right click to attack a tree?

01-24-2004, 10:31 PM#1
Huh
Just curious, by default you must use the "A" hotkey or click attack and then target the tree. Normal units you can right click however. Is this a bug or intentional? I have the unit i want to right click them set to attack trees and he can via the normal method. I just thought enabling a right click would make it easier on my map.

I looked in object editor under destructables but didnt see it as an option for the trees. I didnt see it as an option under the unit. I thought about doing it with a trigger but im clueless how. I dont believe i can do it in world editor but perhaps it can be done? Plz if you know a way, post it here so I can add it to my map to make it even better:)

-Huh
01-24-2004, 11:00 PM#2
JaNa
Siege Units can attack trees on right click. Look at the stats and look at what might change it..cause i'm not quite sure.

Maybe so they can target debris or destructibles?
01-24-2004, 11:32 PM#3
Huh
Hey awesome, a simple fix. I didnt know siege units could right click trees to attack. Ill just change this unit to a siege unit, no biggy.
Thanks.
01-25-2004, 04:22 AM#4
Daleth
You can also do it through triggers. Here's a series of triggers I used to have a unit attack, rather than move to, on right click:

Hunter Smart Target
Events
Unit - A unit Is issued an order targeting an object
Conditions
(Unit-type of (Ordered unit)) Equal to Hunter
(String((Issued order))) Equal to smart
(Level of (Target unit of issued order)) Equal to 0
(Owner of (Target unit of issued order)) Equal to Neutral Passive
Actions
Unit - Order (Ordered unit) to Attack (Target unit of issued order)


Pretty simple. The "smart" order is the order issued when you right click while a unit is selected.
01-25-2004, 04:37 AM#5
Huh
Thats a pretty tight trigger. Would come in handy for units that have, say, 2 attacks a melee and a ranged, and you want them to use ranged on a unit thats not accessable (say because of trees in the way etc)
01-25-2004, 09:17 PM#6
Shimrra
It should work if you go into the unit editor, go under Cambat - Attack 1 - Targets Allowed, and select tree.
01-25-2004, 09:53 PM#7
UltimateJim
exactly what shimrra said, that how it works with peons/peasants/ghouls etc.
01-28-2004, 10:05 PM#8
Aznwhore
not sure but shimrra is right, however, the case could be different for huh