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

[Trigger] Help fix spell trigger

Status
Not open for further replies.
Level 11
Joined
May 31, 2008
Messages
698
  • Line of Frost
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Line of Frost
    • Actions
      • Set Temp_Point[4] = (Position of (Triggering unit))
      • Set Temp_Point[5] = ((Target point of ability being cast) offset by 1000.00 towards (Angle from (Position of (Triggering unit)) to (Target point of ability being cast)) degrees)
      • Set Temp_Point[6] = (Position of (Triggering unit))
      • For each (Integer A) from 1 to ((Level of Line of Frost for (Triggering unit)) + 3), do (Actions)
        • Loop - Actions
          • Set Temp_Point[4] = (Temp_Point[6] offset by 200.00 towards (Angle from Temp_Point[4] to Temp_Point[5]) degrees)
          • Custom script: call RemoveLocation(udg_Temp_Point[6])
          • Unit - Create 1 Frost Dummy for (Owner of (Triggering unit)) at Temp_Point[4] facing Default building facing degrees
          • Set Temp_Point[6] = (Position of (Last created unit))
          • Unit - Add a (Real((Level of Line of Frost for (Triggering unit)))) second Generic expiration timer to (Last created unit)
          • Custom script: call RemoveLocation(udg_Temp_Point[4])
          • Wait (0.20 / (Real((Level of Line of Frost for (Triggering unit))))) seconds
This seems to look right to me, but for some reason the aim is off a bit sometimes and also sometimes it only makes 1 or 2 dummies. Usually this will happen if i target right near/next to the caster (dummy spell is shockwave). Also the aim is worse when i target closer to the caster.

BTW sometimes this works perfectly, but not always and idk why, i think it might have to do with the target being too close to the caster as i said before
 
Ouuu... this is a bit of a mess :S

Post the whole trigger.

As far as i see you are not clearing the handles, you are overwriting them, and still leaking something...

And why 2x position of triggering unit in [4] and [6]? -.-'

  • Line of Frost
  • Events
  • Unit - A unit starts the effect of an ability
  • Conditions
  • (Ability being cast) Equal to Line of Frost
  • Actions
  • Set Temp_Point[4] = (Position of (Triggering unit))
  • Set Temp_Point[5] = (Targeted point of ability being cast)
  • Set Temp_Point[6] = ((Temp_Point[5]) offset by 1000.00 towards (Angle from (Temp_Point[4]) to (Temp_Point[5])) degrees)
  • For each (Integer A) from 1 to ((Level of Line of Frost for (Triggering unit)) + 3), do (Actions)
    • Loop - Actions
      • Set Temp_Point[7] = (Temp_Point[4] offset by 200.00 towards (Angle from Temp_Point[4] to Temp_Point[6]) degrees)
      • Unit - Create 1 Frost Dummy for (Owner of (Triggering unit)) at Temp_Point[7] facing Default building facing degrees
      • Unit - Add a (Real((Level of Line of Frost for (Triggering unit)))) second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_Temp_Point[7])
      • Wait (0.20 / (Real((Level of Line of Frost for (Triggering unit))))) seconds
  • Custom script: call RemoveLocation(udg_Temp_Point[4])
  • Custom script: call RemoveLocation(udg_Temp_Point[5])
  • Custom script: call RemoveLocation(udg_Temp_Point[6])
Dunno i hope i reconnect it right.
 
Status
Not open for further replies.
Top