• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] Help with spell needed! +REP for help

Status
Not open for further replies.
Level 11
Joined
May 31, 2008
Messages
698
I want to make a spell that summons a line of units towards a target. Kind of like shockwave, but it will make like 4 units spaced 200 apart towards the target of the ability being cast, not in front of the casting unit because the casting time wont be enough so the caster can turn to the target. Please help me!! +Rep to ANYBODY who helps :grin:
 
Level 20
Joined
Oct 21, 2006
Messages
3,231
You do it like... You have variable point[0-10]

Unit uses spell
...
Set point[0] position of caster
Set point[1] position of point[0] offset 200 towards unit facing angle of caster
Set point[2] position of point[1] offset 200 towards unit facing angle of caster
...
For loop each integer 1 and 10 do actions
- Create unit at point[loop integer a]

Not sure what you want, but now its like fissure.
 
Level 11
Joined
Nov 15, 2007
Messages
781
  • Line of ghoulz
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Carrion Swarm
    • Actions
      • Set LeakfreePoint1 = (Position of (Casting unit))
      • Set LeakfreePoint2 = (Target point of ability being cast)
      • Set GhoulzAngle = (Angle from LeakfreePoint1 to LeakfreePoint2)
      • Set GhoulzLine = (LeakfreePoint1 offset by 90.00 towards GhoulzAngle degrees)
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Unit - Create 1 Ghoul for (Owner of (Casting unit)) at GhoulzLine facing GhoulzAngle degrees
          • Set GhoulzLine = (GhoulzLine offset by 90.00 towards GhoulzAngle degrees)
          • Wait 0.10 seconds
I had fun watching this in action. Ghouls ftw.
 
Level 11
Joined
May 31, 2008
Messages
698
This is what i have

  • Line of Frost
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Line of Frost
    • Actions
      • Set Temp_Point[7] = (Target point of ability being cast)
      • Set Temp_Point[4] = (Position of (Triggering unit))
      • Set Temp_Point[6] = (Position of (Triggering unit))
      • Set Temp_Point[5] = (Temp_Point[6] offset by 100000.00 towards (Angle from Temp_Point[4] to Temp_Point[6]) degrees)
      • For each (Integer A) from 1 to ((Level of Line of Frost for (Triggering unit)) + 3), do (Actions)
        • Loop - Actions
          • Set Temp_Point[6] = (Position of (Triggering unit))
          • Set Temp_Real[0] = (Angle from Temp_Point[6] to Temp_Point[5])
          • Set Temp_Point[5] = (Temp_Point[6] offset by 100000.00 towards Temp_Real[0] degrees)
          • Set Temp_Point[4] = (Temp_Point[4] offset by 200.00 towards Temp_Real[0] degrees)
          • Unit - Create 1 Frost Dummy for (Owner of (Triggering unit)) at Temp_Point[4] 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)
          • Wait (0.20 / (Real((Level of Line of Frost for (Triggering unit))))) seconds
Sometimes it only make 1 or 2 or 3 frost explosions when its sposed to make 4
 
Level 11
Joined
May 31, 2008
Messages
698
Ok meticulous urs works, but the only thing is that if you cast close to ur hero, then it will only make 1 or 2 of the dummy units and idk why (thats why my trig hass big offsets). I was trying to fix that and i dont know if there is a way. Anyways, like i promised, +Rep to all who helped.
 

Rmx

Rmx

Level 19
Joined
Aug 27, 2007
Messages
1,164
If i undersstand correctly u need an abilitie like fissure but with Dummys ( normal units )

WEll "

Units starts the effect of an abilitie

AB. being cast is ???

  • Set HERO = Casting or Trigering UNIT
  • Set P[1] = Position of HERO
  • Set P[2] = Target point of abilitie being cast
  • Set Real = 200
    • For each integer A do 1 to How much do u need Action
      • Set P[3] = P[1] offset by Real Towards angel between P[1] and P[2]
      • Create Dummy at P[3] bla bla bla
      • Set Real = Real + 200
      • Call RemoveLocation(udg_P[3])
      • Wait 0.27 seconds of game Time
  • Call RemoveLocation(udg_P[1])
  • Call RemoveLocation(udg_P[2])
  • Set Real = 0
  • Set HERO = No unit
 
Status
Not open for further replies.
Top