• 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.

How do i make it so a unit within range of unit(arrow) take damage

Status
Not open for further replies.
Level 4
Joined
Aug 3, 2008
Messages
58
How do i make it so a unit within range of unit(arrow) take damage the unit(arrow) is going very fast until it reaches the end of the map and gets removed
 
Level 14
Joined
Nov 4, 2006
Messages
1,241
permanent immolation? or use a trigger

store the "arrow" in a variable when its created

  • Events
    • Unit - a Unit comes within 300 of "arrow"
  • Conditions
    • triggering Unit is owned by an enemy of owner of "arrow"
  • Actions
    • Unit - cause arrow to deal 100 points damage to triggering Unit of damagetype.....
is the basic idea, also not MUI yet, maybe try immolation first
 
Level 5
Joined
Oct 3, 2008
Messages
104
immolation is ineffective if the arrow moves quickly and you want a small area of effect. for an MUI system, you need to store arrows in a unit array, and use Loop Integer A periodically (every 0.04 seconds) to select all units within range of an arrow, and damage all these units with the trigger.

make sure to use unit groups and remove leaks, otherwise this will lag your map to oblivion
 
Status
Not open for further replies.
Top