• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

How to make a unit attack ONLY it´s target?

Status
Not open for further replies.
Level 10
Joined
Nov 5, 2008
Messages
536
I want to make my marine really stupid. It shall not attack anything at all unless ordered to do so.

If I hit the A button and attack move to target location the unit will only move there. It shall only attack if I target an enemy unit.

How can this be done?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
Although doing this will probably make playing your map annoying as hell...

The idea is to remove the weapon entirly (next to maybe a dummy to show the damage the unit will deal). The actual attack is done by an ability which is set to respond to smart orders (like medivacs do). You can even remove the attack button altogether (I advise this). When the ability is cast at a unit, you initiate a channeling effect which will perodicly (every unit attack period in time) deal damage to the targeted unit. When the unit dies or another order is issued the channeling will be broken so the unit will stop attacking the unit. Animations for the attacks as well as visuals can be set up by actor events.

The key idea is an ability which channels and responds to "smart" orders (right clicks at a target).
 
Status
Not open for further replies.
Top