• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Manual Attack

Status
Not open for further replies.
Level 20
Joined
Jul 14, 2011
Messages
3,213
Remove the attack ability from the unit via trigger, and add a custom one. Detect with triggers when a unit uses that ability, make your unit play the attack animation, and trigger the damage. You can either use "Pre selection" to damage that unit when yours attacks, or pick a random target in front of your unit to damage it.

The map Dark Invasion 2.14 (Now Open and stopped) uses that system perfectly.
 
I know everyone familiar in the map BLADES AND GORES by Kitabatake , he uses manual attacking and im asking how.

@Spartipolio : Hmm , now i want to know how to trigger damage to the attacked unit.

@TheBlood : I mean , manual attacking , means , if you press the ability , then the hero attacks , i dont want my hero to attack creeps automatically.

~~~

I guess warstomp ability can do this ? Maybe? with an AoE damage , but i more like the answer of Spartipolio , will wait on your reply.
 
Last edited:
Level 20
Joined
Jul 14, 2011
Messages
3,213
I never played that map, i'm talking based on Dark Invasion (wich even has a bar that charges the attack and has dmg and miss% based on the charge amount).

Use Channel Ability for the attack. To trigger the damage just use "Unit - Deal damage" or something like that trigger action.

The part i'm not really sure of is the "Pre-selection" part. How to choose which of the units in front of the unit to attack?

I can think two ways to achieve it:

1- Having a "Pre-selectioN" ability that "locks" the target of your attacks.
2- Using "Player - Selection event" to detect when a player selects a unit.

If it's an enemy attach an special effect to it to let your player know that's the locked target. Also add that unit to a "Preselected[Player number of (Triggering Player)]". Automatically trigger the selection of the player hero and, when you press the attack ability, check the distance between the unit and the other one, if it's too high, do nothing, if it's short enough (180) use "Unit - Damage target" action, where the damage source is the Casting Unit, and the target is the "Preselected[Player Number(Triggering Player)]" unit.

Now... How to deal the damage "naturally", the same shown in the Unit stats... i'm not sure. I guess you would have to keep track of all those values with triggers, or have an invisible dummy with same items and stats of your unit, attack the preselected unit.

3- You could have the target acquistiion range of your hero to 0. Also order it to stop if ti acquires a target. Also, if a unit is ordered to attack-move, re-order to move to the same point without attacking. If you order to attack an specific unit, then enable the attack...
 
Level 20
Joined
Jun 27, 2011
Messages
1,864
You mean like this?
  • Attack
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Attack
    • Actions
      • Set tempPoint = (Position of (Triggering unit))
      • Set tempPoint2 = (tempPoint offset by 100.00 towards (Facing of (Triggering unit)) degrees)
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 50.00 of tempPoint2 matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True)) and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 100.00 damage of attack type Spells and damage type Normal
      • Custom script: call RemoveLocation (udg_tempPoint)
      • Custom script: call RemoveLocation (udg_tempPoint2)
 
Level 20
Joined
Jul 14, 2011
Messages
3,213
That would damage every unit in front, like "Cleaving" attack. You could use "Random unit from group" but that would damage different units, not "the one" you want to attack.

To make specific unit attack you have to preselect.

And how yo make the triggered damage be the same the unit has displayed on the unit stats?
 
Status
Not open for further replies.
Top