• 🏆 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!

Stop auto attack

Status
Not open for further replies.
Level 3
Joined
Dec 7, 2008
Messages
24
hi all...
i want make a arena but i have 2 questions:
how to make that walls destroy the attack?
(cant shoot with bow through walls or something like that)
and
how to stop the auto attack?
want that the players must press "A" and then click somewhere to shoot the arrow there
 
Level 18
Joined
Mar 7, 2005
Messages
824
But i think the normal range will be decreased, too. So I'm not sure if this will work.
How about completly removing the attack and using spells for it? add a spell, that does the attack part, as you said you want to press just "A" or any other key to attack.. works perfectly for this.. as for the rocks part.. just add some sight blockers or add some kinda region that detects a unit or else (make the shots a unit, that moves with an arrow model or something like that)...
i think you need some of the phyical spells like grenades or so.. they can't be thrown through walls, copy the idea of them..
 
Level 18
Joined
Mar 7, 2005
Messages
824
Decreasing the acquisition range won't affect normal range. Acquisition range = when an enemy unit enters it, you automatically start attacking them. So, exactly setting this to 0 will eliminate auto attack.

hmm yeah yeah, but I think I remember, that I deaktivated it sometime.. and the Range of the Unit were reduced to this acquisation range.. or it was something other.. I'm not that sure.. but I think that, as I set the Acq.Range to 400 the Attackrange were set t a maximum of 400 too, but could be wrong, or it was another rangepart.. I'm still not sure.. but, well, just try it =)
 
Level 11
Joined
May 31, 2008
Messages
698
If you set the range to 800 and the aquisition range is only 500, then the units range will be 500. I would base this off a spell. Use a projectile system with dummies. For the wall thing, just make it so when the dummy comes in 100 range of the wall kill it.
 
Level 11
Joined
May 31, 2008
Messages
698
Just stop trying to make the attack thing, just do it with triggers and make an ability that fires a dummy unit for the arrow. Besides i think that the only way to destroy the arrow when it hits a wall is if you use a dummy unit for it, unless there is a way in jass. If you want help with this i can help you out.
 
That eats alot of cache because after stopping command the wc3 engine checks for attacking again, that means he will try to attack again and run the trigger in endless loop. That will ofcourse not kill wc3 since attacks have delay of 0,25 because of animation, but surely will eat some space while effecting more then 1 unit.
 
Level 11
Joined
May 31, 2008
Messages
698
  • Create
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to *Your Spell*
    • Actions
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at ((Position of (Triggering unit)) offset by 110.00 towards (Angle from (Position of (Triggering unit)) to (Target point of ability being cast)) degrees) facing (Angle from (Position of (Triggering unit)) to (Target point of ability being cast)) degrees
      • Unit Group - Add (Last created unit) to (Missiles)
      • Unit - Turn collision for (Last created unit) Off
      • Set Dummy = (Last Created Unit)
      • ^Make "Dummy" an array^
      • Wait 2.00 seconds
      • Unit Group - Remove (Dummy) from (Missiles)
      • Unit - Remove (Dummy) from the game
  • Move
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Missiles) and do (Actions)
        • Loop - Actions
          • Unit - Move (Picked unit) instantly to ((Position of (Picked unit)) offset by 12.00 towards (Facing of (Picked unit)) degrees)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Number of units in (Units within 80.00 of (Position of (Picked unit)))) Greater than 0
            • Then - Actions
              • Unit - Kill (Picked unit)
              • Unit Group - Remove (Picked unit) from (Missiles)
            • Else - Actions
  • Remove
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Dummy
    • Actions
      • Wait 1.00 seconds
      • Unit - Remove (Dying unit) from the game
Try doing this. It is a very simple projectile system that should work.
Remember to remove leaks!!!!! Check the http://www.hiveworkshop.com/forums/f269/things-leak-35124/ forum
 
Status
Not open for further replies.
Top