HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Unit, Unable to Attack

07-09-2007, 02:14 PM#1
Thunder_Eye
Hi all, I'm here with a new problem.

I've put the "Hide" button (aka Shadowmeld) inside a hidden spellbook to save space on my heros command card.

However, this prevents him from hiding by pressing "I", so I need a way around this.
As you know, the Night Elves auto-hide when they stay still, so that's what I'm aiming for somehow.

What I need to do:
  • Make unit unable to attack while ordered to holdground

Tried so far:
  • Disabling attack with orb thingy.
  • Setting aquisition range to 0.
  • Pausing unit.
  • Removing classification "Able to attack ground units".

The current test-code (sucks) looks something like this:
Trigger:
HideHoldGround
Collapse Events
Unit - A unit Is issued an order with no target
Conditions
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Issued order) Equal to (Order(holdposition))
Collapse Then - Actions
"Unable attack"
Wait until ((Current order of (Triggering unit)) Not equal to (Order(holdposition))), checking every 0.20 seconds
"Enable attack"
Else - Actions
07-09-2007, 02:24 PM#2
UnMi
A brutal way to do that is to DrunkenHaze that unit.
07-09-2007, 02:33 PM#3
Thunder_Eye
Just making them miss isn't enough, I need to make them unable to auto-attack when standing still.
Like Silence, but that'd prevent them from being ordered manually to attack. (I think)
07-09-2007, 02:52 PM#4
moyack
I think shadoweld can be emulated with a custom ability based on Windwalk, set mana to 0, additional damage to 0, and then create a trigger that detect if the unit is at night and the current order is stop. Check if it works.
07-09-2007, 03:06 PM#5
UnMi
Quote:
Originally Posted by Thunder_Eye
Just making them miss isn't enough, I need to make them unable to auto-attack when standing still.
Like Silence, but that'd prevent them from being ordered manually to attack. (I think)
Drunken Haze can remove the Attack Button entirely, the only problem is that it's dispellable.
Oh wait, you want to remove the auto-attack?
Adding the peon classification will do.
07-09-2007, 03:07 PM#6
Thunder_Eye
Quote:
Originally Posted by moyack
I think shadoweld can be emulated with a custom ability based on Windwalk, set mana to 0, additional damage to 0, and then create a trigger that detect if the unit is at night and the current order is stop. Check if it works.

Well, The "main" hide ability is already based on Windwalk, but it also adds a hidden Shadowmeld. So it's kind of 2 abilities in one. (Windwalk so you can hide whenever you want, and Shadowmeld which makes you invisible at night)

Don't think I should have 2 instances of Windwalk

Quote:
Originally Posted by UnMi
Drunken Haze can remove the Attack Button entirely, the only problem is that it's dispellable.
Oh wait, you want to remove the auto-attack?
Adding the peon classification will do.

I'll try that.

EDIT:
I tried it, and it almost work. Now the hero doesn't autoattack, but he still fights back if attacked first.

I think I forgot to mention that before, but I want it to act just like Shadowmeld.
07-09-2007, 03:19 PM#7
UnMi
Bah, ok, give it Permanent Invisbility, win.
07-09-2007, 03:21 PM#8
Thunder_Eye
Hmm no I want it to "fade out" into invisibility.

But anyway, the solution with the peon classification might be enough.
07-09-2007, 03:24 PM#9
UnMi
Huh? Permanent Invisibility has fading outs.
07-09-2007, 07:55 PM#10
Dil999
I would say trigger it using perment invisibility. Every .05 seconds or so we will need 2 points, point 1 and 2, set point to the position of it, and say if point 1 not equal to point 2 then do nothing. If they are equal, add permenany invisibility and worker class. After this, destroy both points and set point 2 to the position of the unit.
07-09-2007, 08:41 PM#11
TheSecretArts
create a dummy unit that cast invisibility then give permanent invisibilty... bam... you get invisibilty fadeout with permanent invisibility! Then remove invisibilty on movement.
07-11-2007, 11:42 PM#12
Thunder_Eye
The Peon-classification suits my needs.

But thanks anyway!