advanced spell with lightning that struggles

minikrampan

Ultra Cool Member
Reaction score
28
Hey, im trying to create a pentagon thingy with lightningeffects. And when you start moving the spell it changes to a star but i want it to remain a pentagon.
A pentagon is a "circle" or a "Square" with 5 edges.
Cant figure out what the problem is.
and its kinda hard to explain. Ill try post as much stuff as possible.
The best thing would be to try the map and se for you self.

the set up for the ground lightnings
Trigger:
  • For each (Integer A) from 1 to 5, do (Actions)
    • Loop - Actions
      • Set pentapoints[(Integer A)] = (temp_point2 offset by (150.00 x abilitylevel_real) towards real1[3] degrees)
      • If (real1[3] Greater than or equal to 359.00) then do (Set real1[3] = 0.00) else do (Set real1[3] = (real1[3] + 72.00))
      • If (counter Equal to 5) then do (Set counter = 1) else do (Set counter = (counter + 1))
      • Lightning - Create a lightning effect LightType pentapoints[1] pentapoints[2]
      • Set Groundlight[1] = (Last created lightning effect)
      • Lightning - Create a lightning effect LightType pentapoints[2] pentapoints[3]
      • Set Groundlight[2] = (Last created lightning effect)
      • Lightning - Create a lightning effect LightType pentapoints[3] pentapoints[4]
      • Set Groundlight[3] = (Last created lightning effect)
      • Lightning - Create a lightning effect LightType pentapoints[4] pentapoints[5]
      • Set Groundlight[4] = (Last created lightning effect)
      • Lightning - Create a lightning effect LightType pentapoints[5] pentapoints[1]
      • Set Groundlight[5] = (Last created lightning effect)

looks like this
2hwp4k2.jpg


the periodic 0.03 periodic trigger.
Trigger:
  • For each (Integer A) from 1 to 5, do (Actions)
    • Loop - Actions
      • Set pentapoints[(Integer A)] = (temp_point2 offset by (150.00 x abilitylevel_real) towards real1[3] degrees)
      • If (real1[3] Greater than or equal to 359.00) then do (Set real1[3] = 0.00) else do (Set real1[3] = (real1[3] + 72.00))
      • If (counter Equal to 5) then do (Set counter = 1) else do (Set counter = (counter + 1))
      • Custom script: call MoveLightningEx(udg_Groundlight[bj_forLoopAIndex], true, GetLocationX(udg_pentapoints[bj_forLoopAIndex]), GetLocationY(udg_pentapoints[bj_forLoopAIndex]), 0, GetLocationX(udg_pentapoints[udg_counter]), GetLocationY(udg_pentapoints[udg_counter]), 0)
      • Custom script: call RemoveLocation(udg_pentapoints[bj_forLoopAIndex])

It changes when the periodic timer starts
2qstfrs.jpg


Remember when you start the spell you can move it by right clicking on the ground. And its when you do that it messes up
 

Attachments

  • Minikrampan spell (not working).w3x
    18.7 KB · Views: 78
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top