• 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.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Spread Shot Spell

Status
Not open for further replies.
Well here's something similar that Elder Hong posted on Maps 'n' Mods. What this does is fires a dart that puts the first enemy it touches to sleep.

  • TranquilizerDartTrigger
    • Events: - unit start the effect of an ability
    • Conditions: - Ability being cast equals to Tranquilizer Dart
    • Actions:
      • Unit - Create a dart at (position of Triggering Unit) facing (Angle of Triggering Unit)
      • ------ Add Timer here ------
      • unit group -Add last created unit into MyDartUnitGroup
      • Trigger -Turn on DartMovementTrigger
  • DartMovementTrigger
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
      • (MyDartUnitGroup is empty) Equal to False
    • Actions
      • Unit Group - Pick every unit in MyDartUnitGroup and do (Actions)
        • Loop - Actions
          • Custom script: local real dist = 30 //travel 30 distance per 0.05 second
          • Custom script: local real aoe = 100 //collision size
          • Custom script: local string order = "sleep" //order string
          • Custom script: local unit target = null //Do not touch starting this line
          • Custom script: local unit caster = GetEnumUnit()
          • Custom script: local real angle = GetUnitFacing( caster )
          • Custom script: local location p = GetUnitLoc(caster)
          • Custom script: local group g = CreateGroup()
          • Custom script: set g = GetUnitsInRangeOfLocAll( aoe , p)
          • Custom script: loop
          • Custom script: set target = FirstOfGroup(g)
          • Custom script: exitwhen target ==null
          • Custom script: call GroupRemoveUnit(g,target)
          • Custom script: if IsUnitEnemy(target, GetOwningPlayer(caster)) then
          • Custom script: call GroupRemoveUnit(udg_MyDartUnitGroup,caster)
          • Custom script: call GroupClear(g)
          • Custom script: call KillUnit( caster )
          • Unit - Create 1 Dummy Caster for (Owner of (Picked unit)) at (Position of (Triggering unit)) facing (Facing of (Triggering unit)) degrees
          • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
          • Custom script: call IssueTargetOrderBJ( GetLastCreatedUnit() , order, target )
          • Custom script: call RemoveLocation( p )
          • Custom script: call DestroyGroup(g)
          • Custom script: return
          • Custom script: endif
          • Custom script: endloop
          • Custom script: call RemoveLocation( p )
          • Custom script: call DestroyGroup(g)
          • Custom script: call SetUnitPosition(caster, GetUnitX( caster ) + dist * Cos(angle * bj_DEGTORAD), GetUnitY( target ) + dist * Sin(angle * bj_DEGTORAD) )
I know no JASS, so I can't really help you.
 
Status
Not open for further replies.
Top