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

Difficult Spell help!!

Status
Not open for further replies.
Level 37
Joined
Mar 6, 2006
Messages
9,243
That is some horrible, horrible triggering.

Basically you could calculate 5 points around the caster and then link them together, for example:

1 with 3 and 4
2 with 4 and 5
4 with 1

This creates five points around the unit with even spaces. The first point is straight north of the unit.
  • Untitled Trigger 084
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Set u = Paladin 0006 <gen>
      • Set point = (Position of u)
      • For each (Integer A) from 0 to 4, do (Actions)
        • Loop - Actions
          • Set points[(Integer A)] = (point offset by 256.00 towards (90.00 + (72.00 x (Real((Integer A))))) degrees)
          • Unit - Create 1 Footman for Player 1 (Red) at points[(Integer A)] facing Default building facing degrees
After the loop, create the lightnings using the correct begin and starting points and remove the points.
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
Here's a simple system:


  • Untitled Trigger 084
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Set u = Paladin 0006 <gen>
      • Set point = (Position of u)
      • For each (Integer A) from 0 to 4, do (Actions)
        • Loop - Actions
          • Set points[(Integer A)] = (point offset by 256.00 towards (90.00 + (72.00 x (Real((Integer A))))) degrees)
      • Custom script: set udg_lightnings[0] = AddLightningEx("AFOD", true, GetLocationX(udg_points[0]), GetLocationY(udg_points[0]), GetLocationZ(udg_points[0]) + 50, GetLocationX(udg_points[2]), GetLocationY(udg_points[2]), GetLocationZ(udg_points[2]) + 50)
      • Custom script: set udg_lightnings[1] = AddLightningEx("AFOD", true, GetLocationX(udg_points[0]), GetLocationY(udg_points[0]), GetLocationZ(udg_points[0]) + 50, GetLocationX(udg_points[3]), GetLocationY(udg_points[3]), GetLocationZ(udg_points[3]) + 50)
      • Custom script: set udg_lightnings[2] = AddLightningEx("AFOD", true, GetLocationX(udg_points[1]), GetLocationY(udg_points[1]), GetLocationZ(udg_points[1]) + 50, GetLocationX(udg_points[3]), GetLocationY(udg_points[3]), GetLocationZ(udg_points[3]) + 50)
      • Custom script: set udg_lightnings[3] = AddLightningEx("AFOD", true, GetLocationX(udg_points[1]), GetLocationY(udg_points[1]), GetLocationZ(udg_points[1]) + 50, GetLocationX(udg_points[4]), GetLocationY(udg_points[4]), GetLocationZ(udg_points[4]) + 50)
      • Custom script: set udg_lightnings[4] = AddLightningEx("AFOD", true, GetLocationX(udg_points[4]), GetLocationY(udg_points[4]), GetLocationZ(udg_points[4]) + 50, GetLocationX(udg_points[2]), GetLocationY(udg_points[2]), GetLocationZ(udg_points[2]) + 50)
      • For each (Integer A) from 0 to 4, do (Actions)
        • Loop - Actions
          • Custom script: call RemoveLocation(udg_points[bj_forLoopAIndex])


That's not much of a spell yet, it just shows how to create the lighntings. The 50 there is the height offset from the ground and AFOD is the lightning type.

http://www.hiveworkshop.com/forums/pastebin.php?id=yopvxh
 
Status
Not open for further replies.
Top