• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Ranged Attack While moving (without stopping to attack)

Status
Not open for further replies.
Level 7
Joined
Sep 9, 2007
Messages
253
Basically I want to give a unit the capacity to use a ranged attack without halting it's movement in order to do so. I have units moving from region to region, similar to a tower defense, I want them to continue moving to the next region but I would also like them use a ranged attack on any enemy within range.


Thanks for any help.
 
Level 6
Joined
Dec 9, 2007
Messages
208
Pheonix ability. Don't remember the exact name, but it's the one that makes the Phoenix fire at random people.

If you don't want random shooting I think you need some kind of trigger that spawns a unit and attack your target. Don't hang me up on that one.

Good luck
-Sinizi
 
Level 10
Joined
Oct 31, 2009
Messages
352
Well theres a few ways you could do this (to my knowledge):

1. Create a dummy unit to attack for the travelling unit
2. Create a dummy unit that looks like a missile and move him across the screen, then deal damage using triggers
3. Use a custom missile system (i'm sure you can't find a good one here on the hive)
 
Level 7
Joined
Sep 9, 2007
Messages
253
Hmm, I looked at the phoenix fire ability, It seems to be an AOE effect which fires individual missiles just for aesthetics.

I have explored the dummy unit firing for the traveling unit but haven't come up with an effective way, does anybody have any ideas here?

As for the other two I'm not sure how...
 
Level 10
Joined
Oct 31, 2009
Messages
352
I have explored the dummy unit firing for the traveling unit but haven't come up with an effective way, does anybody have any ideas here?

Well the main problem with this ofcourse, is that I am unaware of a way to make it so the dummy unit is invisble while his missile is not. Ideally you would want the dummy unit to have locust and yet still see his missile.

Let me check a few tower defense maps and see if they have attacking units as well\


EDIT - I just looked at a really old tower defense map i've had for ages and it used a Jass custom missile system to accomplish this task. What I would do is take a look in our spell section and find a missile system (there are plenty) that is simple but fits your needs and look into it.
 
If your units are ranges, you can also move them periodically, but using
  • Set Points[1] = (Position of (Picked unit))
  • Set Points[2] = (Points[1] offset by 10.00 towards X degrees)
  • Custom script: call SetUnitX (GetEnumUnit(), GetLocationX (udg_Points[2]))
  • Custom script: call SetUnitY (GetEnumUnit(), GetLocationY (udg_Points[2]))
  • Custom script: call RemoveLocation (udg_Points[1])
  • Custom script: call RemoveLocation (udg_Points[2])
Just make sure you have increased the acquistion range of theirs and the range.
 
Level 13
Joined
May 11, 2008
Messages
1,198
Hmm, I looked at the phoenix fire ability, It seems to be an AOE effect which fires individual missiles just for aesthetics.
i think that's mostly true but also i think i saw a phoenix fire system somewhere...probably at thehelper.net but i'm not sure where which really adds some funcionality to the ability. at any rate phoenix fire ability is what battleships uses, which is a popular custom map.
 
Level 2
Joined
Jan 9, 2010
Messages
8
i tried using Phoenix Fire Before and it seems to set the target a flame. so i dunno... even though im pretty sure i removed the buffs/effects. enless i missed something
 
Status
Not open for further replies.
Top