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

Lightning Field v1.0

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Releases 4 orbs that explode around the hero, spawning smaller orbs which go at random destination and explode after short duration, dealing damage and leaving static orbs with Aura that deals damage over second

  • Configuration
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Here you can set all the data about the spell, so there is no need to edit other triggers or custom stuff like units or abilities --------
      • -------- Only the aura damage of the orbs you have to set in the ability Orb Aura Damage --------
      • -------- ------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
      • -------- The distance that the 4 orbs travel --------
      • Set LR_Radius = 450
      • Set LR_Radius_PerLVL = 50
      • -------- Number of small orbs that are spawned from each big orb --------
      • Set LR_Orbs = 3
      • Set LR_Orbs_PerLVL = 1
      • -------- Damage amount that is done when small orbs explode --------
      • Set LR_OrbDamage = 50
      • Set LR_OrbDamage_PerLVL = 40
      • -------- Duration of Attacking Orbs --------
      • Set LR_AttackingOrb_Duration = 6
      • Set LR_AttackingOrb_Duration_PerLV = 2
      • -------- The damage of the orb attacks --------
      • Set LR_OrbAttack = 65
      • Set LR_OrbAttack_PerLVL = 25
      • -------- ------------------------------------------------------------------------------------------------------------------------------------------------------------ --------
  • Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Lightning Field
    • Actions
      • Set LR_Int = 0
      • Set LR_Caster_Loc = (Position of (Triggering unit))
      • For each (Integer LR_Int2) from 1 to 4, do (Actions)
        • Loop - Actions
          • Set LR_Int = (LR_Int + 90)
          • Set LR_Target_Loc = (LR_Caster_Loc offset by ((Real(LR_Radius)) + ((Real((Level of (Ability being cast) for (Triggering unit)))) x (Real(LR_Radius_PerLVL)))) towards (Real(LR_Int)) degrees)
          • Unit - Create 1 Lightning Orb for (Owner of (Triggering unit)) at LR_Caster_Loc facing Default building facing degrees
          • Unit - Order (Last created unit) to Move To LR_Target_Loc
          • Unit - Add Lightning Field to (Last created unit)
          • Unit - Set level of Lightning Field for (Last created unit) to (Level of Lightning Field for (Triggering unit))
          • Unit - Add a (((Real(LR_Radius)) + ((Real(LR_Radius_PerLVL)) x (Real((Level of (Ability being cast) for (Triggering unit)))))) / 520.00) second Generic expiration timer to (Last created unit)
          • Custom script: call RemoveLocation(udg_LR_Target_Loc)
      • Custom script: call RemoveLocation(udg_LR_Caster_Loc)
  • Orbs Death
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Lightning Orb
    • Actions
      • Set LR_Target_Loc = (Position of (Triggering unit))
      • For each (Integer LR_Int2) from 1 to (LR_Orbs + (LR_Orbs_PerLVL x (Level of Lightning Field for (Triggering unit)))), do (Actions)
        • Loop - Actions
          • Unit - Create 1 Lightning Orb /small for (Owner of (Triggering unit)) at LR_Target_Loc facing Default building facing degrees
          • Set LR_RandomPoint = (Random point in (Playable map area))
          • Unit - Order (Last created unit) to Move To LR_RandomPoint
          • Unit - Add a (Random real number between 0.50 and 1.50) second Generic expiration timer to (Last created unit)
          • Custom script: call RemoveLocation(udg_LR_RandomPoint)
      • Custom script: call RemoveLocation(udg_LR_Target_Loc)
  • Small Orbs Death
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Lightning Orb /small
    • Actions
      • Set LR_Target_Loc = (Position of (Triggering unit))
      • Special Effect - Create a special effect at LR_Target_Loc using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Set LR_DamagedUnits = (Units within 300.00 of LR_Target_Loc matching ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and (((Matching unit) is A structure) Equal to False)))
      • Unit Group - Pick every unit in LR_DamagedUnits and do (Actions)
        • Loop - Actions
          • Unit - Cause (Triggering unit) to damage (Picked unit), dealing ((Real(LR_OrbDamage)) + ((Real(LR_OrbDamage_PerLVL)) x (Real((Level of Lightning Field for (Triggering unit)))))) damage of attack type Spells and damage type Normal
      • Custom script: call DestroyGroup(udg_LR_DamagedUnits)
      • Unit - Create 1 Attacking Orb for (Owner of (Triggering unit)) at LR_Target_Loc facing Default building facing degrees
      • Unit - Add Lightning Field to (Last created unit)
      • Unit - Set level of Lightning Field for (Last created unit) to (Level of Lightning Field for (Triggering unit))
      • Unit - Add a ((Real(LR_AttackingOrb_Duration)) + ((Real(LR_AttackingOrb_Duration_PerLV)) x (Real((Level of Lightning Field for (Triggering unit)))))) second Generic expiration timer to (Last created unit)
      • Custom script: call RemoveLocation(udg_LR_Target_Loc)
  • Orb Attacks Damage
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Orb Attack
    • Actions
      • Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing ((Real(LR_OrbAttack)) + ((Real(LR_OrbAttack_PerLVL)) x (Real((Level of Lightning Field for (Triggering unit)))))) damage of attack type Spells and damage type Normal
  • Order Orb attacks
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Attacking Orb
    • Actions
      • Set LR_Target_Loc = (Position of (Triggering unit))
      • Set LR_DamagedUnits2[(Player number of (Owner of (Triggering unit)))] = (Units within 600.00 of LR_Target_Loc matching ((((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True) and ((((Matching unit) is A structure) Equal to False) and (((Matching unit) is alive) Equal to True))))
      • Unit - Order (Triggering unit) to Neutral Naga Sea Witch - Forked Lightning (Random unit from LR_DamagedUnits2[(Player number of (Owner of (Triggering unit)))])
      • Custom script: call RemoveLocation(udg_LR_Target_Loc)
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Custom script: call DestroyGroup(udg_LR_DamagedUnits2[GetForLoopIndexA()])


Keywords:
Lightning field electric thunder forked orb
Contents

Lighting Field v1.0 (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. Moderator: Pharaoh_ Date: 22:51, 12th Jul 2012 One spell having so many triggers is unacceptable. Merge them, ask within Triggers and Scripts forum, if it is more convenient. You...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.

160036-albums4747-picture55861.png

Moderator: Pharaoh_
Date: 22:51, 12th Jul 2012

Review
One spell having so many triggers is unacceptable. Merge them, ask within Triggers and Scripts forum, if it is more convenient.
You do not need the unit group to have an array; you are destroying every possible group this way, owned by the 12 players. You are supposed to only "kill" the group that has been created for that specific player only.

MPI is so old-news. Update it to MUI.
 
This gives me an idea.

I need to write a tutorial explaining the ugliness and bug-prone usage of (Integer A) in loops.
It's more complex than you think.

Most users don't understand /why/ this is buggy.

And about the spell, well, all I'm going to say is that it would be far better if you were to store things like (Owner of (Triggering unit)) and (Triggering unit) in variables so you don't have to continue calling the functions again and again and again and again.

An example:

  • Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Lightning Field
    • Actions
      • Set LR_Int = 0
      • Set LR_Caster = (Triggering unit)
      • Set LR_Level = (Real(Level of Lightning Field for LR_Caster))
      • Set LR_Caster_Loc = (Position of LR_Caster)
      • Set LR_Player = (Triggering player)
      • For each (Integer LR_Int2) from 1 to 4, do (Actions)
        • Loop - Actions
          • Set LR_Int = (LR_Int + 90)
          • Set LR_Target_Loc = (LR_Caster_Loc offset by ((Real(LR_Radius)) + LR_Level x (Real(LR_Radius_PerLVL)))) towards (Real(LR_Int)) degrees)
          • Unit - Create 1 Lightning Orb for LR_Player at LR_Caster_Loc facing Default building facing degrees
          • Set TempUnit = (Last created unit)
          • Unit - Order TempUnit to Move To LR_Target_Loc
          • Unit - Add Lightning Field to TempUnit
          • Unit - Set level of Lightning Field for TempUnit to (Integer(LR_Level))
          • Unit - Add a (((Real(LR_Radius)) + ((Real(LR_Radius_PerLVL)) x LR_Level)) / 520.00) second Generic expiration timer to TempUnit
          • Custom script: call RemoveLocation(udg_LR_Target_Loc)
      • Custom script: call RemoveLocation(udg_LR_Caster_Loc)
 
Level 2
Joined
May 29, 2012
Messages
4
This gives me an idea.

I need to write a tutorial explaining the ugliness and bug-prone usage of (Integer A) in loops.
It's more complex than you think.

Most users don't understand /why/ this is buggy.

And about the spell, well, all I'm going to say is that it would be far better if you were to store things like (Owner of (Triggering unit)) and (Triggering unit) in variables so you don't have to continue calling the functions again and again and again and again.

Oh well, yeah it's more simple like that, I'll use that in future, thanks :)
 
GUI and JASS have their pros and cons.

GUI:
  • Pros:
    • The graphic interface is nice.
    • It's very beginner friendly.
  • Cons:
    • The functions it uses are incredibly slow and redundant most of the time.
    • It's hard to develop complex systems.

JASS: (Not vJASS, plain JASS with the normal editor.)
  • Pros:
    • Very fast system development.
    • Convenience and easier configuration thanks to functions which can be used as filters and shit.
  • Cons:
    • It's hard to read the code due to the lack of highlighting.
    • Syntax errors can occur a lot due to the lack of highlighting.
    • The syntax checker is terrible.


vJASS fixes all of JASS problems giving it 0 cons.
Well, there's only one con. We have to use some workarounds to
fix JassHelper issues and get top-notch scripts with no shit-code.

vJASS > JASS = GUI.
 
With no highlighting, development is harder. Plain JASS would be far better for development if the normal editor had highlighting.
In general, yes: JASS > GUI, but for beginners, they're just about the same.
This isn't a problem for people like me though, I don't need highlighting.
In fact, most of my systems are made here, on the spot, with no compiling or testing, and I don't often get errors :p
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
This gives me an idea.

I need to write a tutorial explaining the ugliness and bug-prone usage of (Integer A) in loops.
It's more complex than you think.

Most users don't understand /why/ this is buggy.
Maggy, a delivery!

What they were discussing;
(Integer A) is a global which might collide with another (Integer A) usage in another trigger (provided that 2 triggers run at the same time using the same (Integer A)).

But as I have been told that Warcraft III uses a single-threaded system which if a global is shared (used in another trigger at the same time), it won't bug because it would run in Trigger A first before running to Trigger B (though, we can't see the speed of these "queue")

If you want a prove, try these triggers;
  • Trigger A
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set u = Blood Mage 0000 <gen>
      • Unit - Kill u
  • Trigger B
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set u = Blood Mage 0001 <gen>
      • Unit - Kill u
It will kill both of those units but they share the same global variable, right ?
That's why it won't bug.

NOTE: But with the use of TriggerSleepAction or Waits, it could bug the system, otherwise it will work as it intended.
 

The amount of idiocy in that thread amuses me :L

Yes, (Integer A) does bug.

If you nest an Integer A loop inside of an integer A loop, it will bug.
And no, this can't be avoided theoretically speaking.

Never use (Integer A). Never I say.

  • Derp
    • Events
      • Unit - A unit dies
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • Custom script: call BJDebugMsg("la la la la la A unit died la la la la la la la")
  • Herp
    • Events
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 10, do (Actions)
        • Loop - Actions
          • SomeUnit = (Random unit in .....)
          • Unit - Kill SomeUnit

See how that bugs?
And it's unavoidable. Individually, they both look perfectly fine. Nothing's wrong with them.
When put together, they interfere with each other.

Don't use (Integer A). Never I say!

NEVER.

Thanks :3
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
There is a catch, I said that in my previous post didn't I ?
There are restrictions not to use that, not to use this, such as Waits, well I think if it's meant for simple things you can use (Integer A) but if it's deep and runs through lots of code, I suggest it should be our own variable because that function is meant for simplicity.

Also, you should not use this as to interfere with each other's Events (like what you did in that example), it should be Trigger A did its thing and Trigger B did its thing, if it meant to interfere, well, just resort to variables I guess.

There's no harm in using as long you know the taboo.
 
Top