some spell questions

Olyvian

New Member
Reaction score
2
here's one of my first spell:

Trigger:
  • Blades Nature
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to |cff7cfc00Blades Nature|r
    • Actions
      • Set Spell_Point[1] = (Target point of ability being cast)
      • Set Spell_Point[2] = (Target point of issued order)
      • Set Spell_Point[3] = (Spell_Point[1] offset by 200.00 towards 60.00 degrees)
      • Set Spell_Point[4] = (Spell_Point[1] offset by 200.00 towards 120.00 degrees)
      • Set Spell_Point[5] = (Spell_Point[1] offset by 200.00 towards 180.00 degrees)
      • Set Spell_Point[6] = (Spell_Point[1] offset by 200.00 towards 240.00 degrees)
      • Set Spell_Point[7] = (Spell_Point[1] offset by 200.00 towards 300.00 degrees)
      • Set Spell_Point[8] = (Spell_Point[1] offset by 200.00 towards 360.00 degrees)
      • Special Effect - Create a special effect at Spell_Point[1] using Abilities\Spells\Undead\Possession\PossessionMissile.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect at Spell_Point[3] using Abilities\Spells\Undead\Possession\PossessionMissile.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect at Spell_Point[4] using Abilities\Spells\Undead\Possession\PossessionMissile.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect at Spell_Point[5] using Abilities\Spells\Undead\Possession\PossessionMissile.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect at Spell_Point[6] using Abilities\Spells\Undead\Possession\PossessionMissile.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect at Spell_Point[7] using Abilities\Spells\Undead\Possession\PossessionMissile.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect at Spell_Point[8] using Abilities\Spells\Undead\Possession\PossessionMissile.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Create 1 Deadly Wipe for Neutral Passive at Spell_Point[3] facing Spell_Point[1]
      • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
      • Unit - Order (Last created unit) to Patrol To Spell_Point[6]
      • Unit - Create 1 Deadly Wipe for Neutral Passive at Spell_Point[4] facing Spell_Point[1]
      • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
      • Unit - Order (Last created unit) to Patrol To Spell_Point[8]
      • Unit - Create 1 Deadly Wipe for Neutral Passive at Spell_Point[5] facing Spell_Point[1]
      • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
      • Unit - Order (Last created unit) to Patrol To Spell_Point[4]
      • Unit - Create 1 Deadly Wipe for Neutral Passive at Spell_Point[6] facing Spell_Point[1]
      • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
      • Unit - Order (Last created unit) to Patrol To Spell_Point[7]
      • Unit - Create 1 Deadly Wipe for Neutral Passive at Spell_Point[7] facing Spell_Point[1]
      • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
      • Unit - Order (Last created unit) to Patrol To Spell_Point[3]
      • Unit - Create 1 Deadly Wipe for Neutral Passive at Spell_Point[8] facing Spell_Point[1]
      • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
      • Unit - Order (Last created unit) to Patrol To Spell_Point[5]
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • Custom script: call RemoveLocation (udg_Spell_Point[GetForLoopIndexA()])


Q1: Is there anything here that can be approved in this spell?

Q2: Have I removed all the leaks?

Q3: Can this spell be played in multiplayer without crash etc..

Screenshot:
hmm
449921.jpeg
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Well, all of this can be moved to a simple "Integer A" loop, and using the "Integer A" variable to determine the angle of offset, like:
Trigger:
  • Set Spell_Point[3] = (Spell_Point[1] offset by 200.00 towards (Integer A * 60) degrees)


And then you don't need all the arrays, just use one of them for this variable and destroy it inside the loop :D
 

Olyvian

New Member
Reaction score
2
this doesn't work
Trigger:
  • Set Spell_Point[3] = (Spell_Point[1] offset by 200.00 towards ((Real((Integer A))) x 60.00) degrees)
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Well, the loop you're supposed to put that inside of:
Trigger:
  • For each (Integer A) from 1 to 6, do (Actions)
    • Loop - Actions
 
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