• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Problem about my Storm Spirit map

Status
Not open for further replies.
Level 3
Joined
Nov 12, 2010
Messages
53
Hello,

I have a trigger problem in my map, Storm Spirit Wars. The problem is which occurs when anyone casts an ability called "Ball Lightning".

This is the spell description:

Storm Spirit becomes enveloped with energy, losing his physical form, and travels until he depletes his mana or reaches his target. While in this form, he deals damage to nearby units based on how far his electrical form has traveled. Damage, speed and area of effect improves per level.

So, technically this spell turns the Storm Spirit into a ball and travels to the target area.

Before I want to say the problem, my map contains 5 elemental Storm Spirits which are Earth, Fire, Water, Electy(Original Storm Spirit) and Nature.

The problem is whenever other element Storm Spirits (Earth, Fire, Water and Nature) casts ball lightning, two Storm Spirits will be created and turn into a ball and travel to the target location. (Doesn't effect electy because it is the original Storm Spirit) So, it is quite ugly when it appeared 2 Storm Spirits.

Summary:The problem is the Ball Lightning spell appears 2 Storm Spirit travelling to the target location. So, I would only want 1 Storm Spirit travelling.

If anyone could help me out, please PM me and I will give the link of the pastebin of my map to you and try to fix it for me. Any help would be much appreciated. Thanks!
 
Level 7
Joined
May 3, 2007
Messages
210
No one can help you without the triggering for the spell itself. And please don't make use drudge through a map looking for a trigger.

In other news, sounds like a leak.
 
Level 12
Joined
Apr 4, 2010
Messages
862
Hello,

I have a trigger problem in my map, Storm Spirit Wars. The problem is which occurs when anyone casts an ability called "Ball Lightning".

This is the spell description:

Storm Spirit becomes enveloped with energy, losing his physical form, and travels until he depletes his mana or reaches his target. While in this form, he deals damage to nearby units based on how far his electrical form has traveled. Damage, speed and area of effect improves per level.

So, technically this spell turns the Storm Spirit into a ball and travels to the target area.

Before I want to say the problem, my map contains 5 elemental Storm Spirits which are Earth, Fire, Water, Electy(Original Storm Spirit) and Nature.

The problem is whenever other element Storm Spirits (Earth, Fire, Water and Nature) casts ball lightning, two Storm Spirits will be created and turn into a ball and travel to the target location. (Doesn't effect electy because it is the original Storm Spirit) So, it is quite ugly when it appeared 2 Storm Spirits.

Summary:The problem is the Ball Lightning spell appears 2 Storm Spirit travelling to the target location. So, I would only want 1 Storm Spirit travelling.

If anyone could help me out, please PM me and I will give the link of the pastebin of my map to you and try to fix it for me. Any help would be much appreciated. Thanks!

I can help, if you me to. PM me the pastebin link or VM it to me.
 
Level 19
Joined
Apr 10, 2010
Messages
2,789
Here: Raijin Spellpack from thehelper.net
Triggers:

  • Ball Lightning
  • Events
  • Unit - A unit Starts the effect of an ability
  • Conditions
  • (Ability being cast) Equal to Ball Lightning
  • Actions
  • Set BallLightning_Counts = (BallLightning_Counts + 1)
  • Set BallLightning_Caster[BallLightning_Counts] = (Casting unit)
  • Unit - Set mana of BallLightning_Caster[BallLightning_Counts] to ((Mana of BallLightning_Caster[BallLightning_Counts]) - (15.00 + (0.07 x (Max mana of BallLightning_Caster[BallLightning_Counts]))))
  • Set BallLightning_CasterLoc[BallLightning_Counts] = (Position of BallLightning_Caster[BallLightning_Counts])
  • Set BallLightning_TargetPoint[BallLightning_Counts] = (Target point of ability being cast)
  • Set BallLightning_Angle[BallLightning_Counts] = (Angle from BallLightning_CasterLoc[BallLightning_Counts] to BallLightning_TargetPoint[BallLightning_Counts])
  • Set BallLightning_Levels = (Level of Ball Lightning for BallLightning_Caster[BallLightning_Counts])
  • Set BallLightning_Speed[1] = 25.00
  • Set BallLightning_Speed[2] = 37.50
  • Set BallLightning_Speed[3] = 50.00
  • Set BallLightning_SpeedMove[BallLightning_Counts] = BallLightning_Speed[BallLightning_Levels]
  • Set BallLightning_Distance[BallLightning_Counts] = (Distance between BallLightning_CasterLoc[BallLightning_Counts] and BallLightning_TargetPoint[BallLightning_Counts])
  • Set BallLightning_DistanceMoved[BallLightning_Counts] = 0.00
  • Set BallLightning_Damage[1] = 8.00
  • Set BallLightning_Damage[2] = 12.00
  • Set BallLightning_Damage[3] = 16.00
  • Set BallLightning_DamageRate[BallLightning_Counts] = BallLightning_Damage[BallLightning_Levels]
  • Set BallLightning_DamageDealt[BallLightning_Counts] = 0.00
  • Set BallLightning_DamageCount[BallLightning_Counts] = 0.00
  • Set BallLightning_AoE[1] = 150.00
  • Set BallLightning_AoE[2] = 225.00
  • Set BallLightning_AoE[3] = 300.00
  • Set BallLightning_AoEHit[BallLightning_Counts] = BallLightning_AoE[BallLightning_Levels]
  • Animation - Change BallLightning_Caster[BallLightning_Counts]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency
  • Unit - Create 1 Ball Lightning for (Owner of BallLightning_Caster[BallLightning_Counts]) at BallLightning_CasterLoc[BallLightning_Counts] facing BallLightning_Angle[BallLightning_Counts] degrees
  • Unit - Set the custom value of (Last created unit) to BallLightning_Counts
  • Unit Group - Add (Last created unit) to BallLightning_DummyGroup
  • Special Effect - Create a special effect attached to the origin of (Last created unit) using war3mapImported\Static_Remnant_FX.mdx
  • Set BallLightning_SE[BallLightning_Counts] = (Last created special effect)
  • Unit - Turn collision for BallLightning_Caster[BallLightning_Counts] Off
  • Unit - Make BallLightning_Caster[BallLightning_Counts] Invulnerable
  • Lightning - Create a Forked Lightning lightning effect from source BallLightning_CasterLoc[BallLightning_Counts] to target BallLightning_CasterLoc[BallLightning_Counts]
  • Set BallLightning_Lightning[BallLightning_Counts] = (Last created lightning effect)
  • Trigger - Turn on Ball Lightning Move <gen>
  • Ball Lightning Move
  • Events
  • Time - Every 0.02 seconds of game time
  • Conditions
  • Actions
  • Unit Group - Pick every unit in BallLightning_DummyGroup and do (Actions)
  • Loop - Actions
  • Set BallLightning_CustomValue = (Custom value of (Picked unit))
  • Set BallLightning_ManaUsed = (10.00 + (0.01 x (Max mana of BallLightning_Caster[BallLightning_CustomValue])))
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • (Mana of BallLightning_Caster[BallLightning_CustomValue]) Greater than or equal to BallLightning_ManaUsed
  • Then - Actions
  • Set BallLightning_Point[1] = (Position of (Picked unit))
  • Set BallLightning_Point[2] = (BallLightning_Point[1] offset by BallLightning_SpeedMove[BallLightning_CustomValue] towards BallLightning_Angle[BallLightning_CustomValue] degrees)
  • Destructible - Pick every destructible within 100.00 of BallLightning_Point[2] and do (Actions)
  • Loop - Actions
  • Destructible - Kill (Picked destructible)
  • Unit - Move (Picked unit) instantly to BallLightning_Point[2]
  • Custom script: call SetUnitX( udg_BallLightning_Caster[udg_BallLightning_CustomValue], GetLocationX( udg_BallLightning_Point[2] ) )
  • Custom script: call SetUnitY( udg_BallLightning_Caster[udg_BallLightning_CustomValue], GetLocationY( udg_BallLightning_Point[2] ) )
  • Lightning - Move BallLightning_Lightning[BallLightning_CustomValue] to source BallLightning_CasterLoc[BallLightning_Counts] and target BallLightning_Point[2]
  • Set BallLightning_DistanceMoved[BallLightning_CustomValue] = (BallLightning_DistanceMoved[BallLightning_CustomValue] + BallLightning_SpeedMove[BallLightning_CustomValue])
  • Set BallLightning_DamageCount[BallLightning_CustomValue] = (BallLightning_DamageCount[BallLightning_CustomValue] + BallLightning_SpeedMove[BallLightning_CustomValue])
  • Unit - Set mana of BallLightning_Caster[BallLightning_CustomValue] to ((Mana of BallLightning_Caster[BallLightning_CustomValue]) - (10.00 + (0.01 x (Max mana of BallLightning_Caster[BallLightning_CustomValue]))))
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • BallLightning_DamageCount[BallLightning_CustomValue] Greater than or equal to 100.00
  • Then - Actions
  • Set BallLightning_DamageCount[BallLightning_CustomValue] = 0.00
  • Set BallLightning_DamageDealt[BallLightning_CustomValue] = (BallLightning_DamageDealt[BallLightning_CustomValue] + BallLightning_DamageRate[BallLightning_CustomValue])
  • Else - Actions
  • Set BallLightning_UnitGroup = (Units within BallLightning_AoEHit[BallLightning_CustomValue] of BallLightning_Point[2] matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is in BallLightning_HitGroup[BallLightning_CustomValue]) Not equal to True) and ((((M
  • Unit Group - Pick every unit in BallLightning_UnitGroup and do (Actions)
  • Loop - Actions
  • Unit Group - Add (Picked unit) to BallLightning_HitGroup[BallLightning_CustomValue]
  • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\ManaFlare\ManaFlareBoltImpact.mdl
  • Special Effect - Destroy (Last created special effect)
  • Unit - Cause BallLightning_Caster[BallLightning_CustomValue] to damage (Picked unit), dealing BallLightning_DamageDealt[BallLightning_CustomValue] damage of attack type Spells and damage type Normal
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • BallLightning_DistanceMoved[BallLightning_CustomValue] Greater than or equal to BallLightning_Distance[BallLightning_CustomValue]
  • Then - Actions
  • Unit - Make BallLightning_Caster[BallLightning_CustomValue] Vulnerable
  • Lightning - Destroy BallLightning_Lightning[BallLightning_CustomValue]
  • Unit - Turn collision for BallLightning_Caster[BallLightning_CustomValue] On
  • Animation - Change BallLightning_Caster[BallLightning_CustomValue]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
  • Unit Group - Remove (Picked unit) from BallLightning_DummyGroup
  • Unit - Remove (Picked unit) from the game
  • Special Effect - Destroy BallLightning_SE[BallLightning_CustomValue]
  • Custom script: call RemoveLocation (udg_BallLightning_CasterLoc[udg_BallLightning_CustomValue])
  • Custom script: call DestroyGroup (udg_BallLightning_HitGroup[udg_BallLightning_CustomValue])
  • Else - Actions
  • Custom script: call RemoveLocation (udg_BallLightning_Point[1])
  • Custom script: call RemoveLocation (udg_BallLightning_Point[2])
  • Custom script: call DestroyGroup (udg_BallLightning_UnitGroup)
  • Else - Actions
  • Unit - Make BallLightning_Caster[BallLightning_CustomValue] Vulnerable
  • Lightning - Destroy BallLightning_Lightning[BallLightning_CustomValue]
  • Unit - Turn collision for BallLightning_Caster[BallLightning_CustomValue] On
  • Animation - Change BallLightning_Caster[BallLightning_CustomValue]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
  • Unit Group - Remove (Picked unit) from BallLightning_DummyGroup
  • Unit - Remove (Picked unit) from the game
  • Special Effect - Destroy BallLightning_SE[BallLightning_CustomValue]
  • Custom script: call RemoveLocation (udg_BallLightning_CasterLoc[udg_BallLightning_CustomValue])
  • Custom script: call DestroyGroup (udg_BallLightning_HitGroup[udg_BallLightning_CustomValue])
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • (Number of units in BallLightning_DummyGroup) Equal to 0
  • Then - Actions
  • Trigger - Turn off (This trigger)
  • Else - Actions

SetUnit X/Y has been used to prevent the stopping of current order when the unit is travelling with ball lightning.

 
Level 3
Joined
Nov 12, 2010
Messages
53
Here: Raijin Spellpack from thehelper.net
Triggers:

  • Ball Lightning
  • Events
  • Unit - A unit Starts the effect of an ability
  • Conditions
  • (Ability being cast) Equal to Ball Lightning
  • Actions
  • Set BallLightning_Counts = (BallLightning_Counts + 1)
  • Set BallLightning_Caster[BallLightning_Counts] = (Casting unit)
  • Unit - Set mana of BallLightning_Caster[BallLightning_Counts] to ((Mana of BallLightning_Caster[BallLightning_Counts]) - (15.00 + (0.07 x (Max mana of BallLightning_Caster[BallLightning_Counts]))))
  • Set BallLightning_CasterLoc[BallLightning_Counts] = (Position of BallLightning_Caster[BallLightning_Counts])
  • Set BallLightning_TargetPoint[BallLightning_Counts] = (Target point of ability being cast)
  • Set BallLightning_Angle[BallLightning_Counts] = (Angle from BallLightning_CasterLoc[BallLightning_Counts] to BallLightning_TargetPoint[BallLightning_Counts])
  • Set BallLightning_Levels = (Level of Ball Lightning for BallLightning_Caster[BallLightning_Counts])
  • Set BallLightning_Speed[1] = 25.00
  • Set BallLightning_Speed[2] = 37.50
  • Set BallLightning_Speed[3] = 50.00
  • Set BallLightning_SpeedMove[BallLightning_Counts] = BallLightning_Speed[BallLightning_Levels]
  • Set BallLightning_Distance[BallLightning_Counts] = (Distance between BallLightning_CasterLoc[BallLightning_Counts] and BallLightning_TargetPoint[BallLightning_Counts])
  • Set BallLightning_DistanceMoved[BallLightning_Counts] = 0.00
  • Set BallLightning_Damage[1] = 8.00
  • Set BallLightning_Damage[2] = 12.00
  • Set BallLightning_Damage[3] = 16.00
  • Set BallLightning_DamageRate[BallLightning_Counts] = BallLightning_Damage[BallLightning_Levels]
  • Set BallLightning_DamageDealt[BallLightning_Counts] = 0.00
  • Set BallLightning_DamageCount[BallLightning_Counts] = 0.00
  • Set BallLightning_AoE[1] = 150.00
  • Set BallLightning_AoE[2] = 225.00
  • Set BallLightning_AoE[3] = 300.00
  • Set BallLightning_AoEHit[BallLightning_Counts] = BallLightning_AoE[BallLightning_Levels]
  • Animation - Change BallLightning_Caster[BallLightning_Counts]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency
  • Unit - Create 1 Ball Lightning for (Owner of BallLightning_Caster[BallLightning_Counts]) at BallLightning_CasterLoc[BallLightning_Counts] facing BallLightning_Angle[BallLightning_Counts] degrees
  • Unit - Set the custom value of (Last created unit) to BallLightning_Counts
  • Unit Group - Add (Last created unit) to BallLightning_DummyGroup
  • Special Effect - Create a special effect attached to the origin of (Last created unit) using war3mapImported\Static_Remnant_FX.mdx
  • Set BallLightning_SE[BallLightning_Counts] = (Last created special effect)
  • Unit - Turn collision for BallLightning_Caster[BallLightning_Counts] Off
  • Unit - Make BallLightning_Caster[BallLightning_Counts] Invulnerable
  • Lightning - Create a Forked Lightning lightning effect from source BallLightning_CasterLoc[BallLightning_Counts] to target BallLightning_CasterLoc[BallLightning_Counts]
  • Set BallLightning_Lightning[BallLightning_Counts] = (Last created lightning effect)
  • Trigger - Turn on Ball Lightning Move <gen>
  • Ball Lightning Move
  • Events
  • Time - Every 0.02 seconds of game time
  • Conditions
  • Actions
  • Unit Group - Pick every unit in BallLightning_DummyGroup and do (Actions)
  • Loop - Actions
  • Set BallLightning_CustomValue = (Custom value of (Picked unit))
  • Set BallLightning_ManaUsed = (10.00 + (0.01 x (Max mana of BallLightning_Caster[BallLightning_CustomValue])))
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • (Mana of BallLightning_Caster[BallLightning_CustomValue]) Greater than or equal to BallLightning_ManaUsed
  • Then - Actions
  • Set BallLightning_Point[1] = (Position of (Picked unit))
  • Set BallLightning_Point[2] = (BallLightning_Point[1] offset by BallLightning_SpeedMove[BallLightning_CustomValue] towards BallLightning_Angle[BallLightning_CustomValue] degrees)
  • Destructible - Pick every destructible within 100.00 of BallLightning_Point[2] and do (Actions)
  • Loop - Actions
  • Destructible - Kill (Picked destructible)
  • Unit - Move (Picked unit) instantly to BallLightning_Point[2]
  • Custom script: call SetUnitX( udg_BallLightning_Caster[udg_BallLightning_CustomValue], GetLocationX( udg_BallLightning_Point[2] ) )
  • Custom script: call SetUnitY( udg_BallLightning_Caster[udg_BallLightning_CustomValue], GetLocationY( udg_BallLightning_Point[2] ) )
  • Lightning - Move BallLightning_Lightning[BallLightning_CustomValue] to source BallLightning_CasterLoc[BallLightning_Counts] and target BallLightning_Point[2]
  • Set BallLightning_DistanceMoved[BallLightning_CustomValue] = (BallLightning_DistanceMoved[BallLightning_CustomValue] + BallLightning_SpeedMove[BallLightning_CustomValue])
  • Set BallLightning_DamageCount[BallLightning_CustomValue] = (BallLightning_DamageCount[BallLightning_CustomValue] + BallLightning_SpeedMove[BallLightning_CustomValue])
  • Unit - Set mana of BallLightning_Caster[BallLightning_CustomValue] to ((Mana of BallLightning_Caster[BallLightning_CustomValue]) - (10.00 + (0.01 x (Max mana of BallLightning_Caster[BallLightning_CustomValue]))))
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • BallLightning_DamageCount[BallLightning_CustomValue] Greater than or equal to 100.00
  • Then - Actions
  • Set BallLightning_DamageCount[BallLightning_CustomValue] = 0.00
  • Set BallLightning_DamageDealt[BallLightning_CustomValue] = (BallLightning_DamageDealt[BallLightning_CustomValue] + BallLightning_DamageRate[BallLightning_CustomValue])
  • Else - Actions
  • Set BallLightning_UnitGroup = (Units within BallLightning_AoEHit[BallLightning_CustomValue] of BallLightning_Point[2] matching ((((Matching unit) is A structure) Not equal to True) and ((((Matching unit) is in BallLightning_HitGroup[BallLightning_CustomValue]) Not equal to True) and ((((M
  • Unit Group - Pick every unit in BallLightning_UnitGroup and do (Actions)
  • Loop - Actions
  • Unit Group - Add (Picked unit) to BallLightning_HitGroup[BallLightning_CustomValue]
  • Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\ManaFlare\ManaFlareBoltImpact.mdl
  • Special Effect - Destroy (Last created special effect)
  • Unit - Cause BallLightning_Caster[BallLightning_CustomValue] to damage (Picked unit), dealing BallLightning_DamageDealt[BallLightning_CustomValue] damage of attack type Spells and damage type Normal
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • BallLightning_DistanceMoved[BallLightning_CustomValue] Greater than or equal to BallLightning_Distance[BallLightning_CustomValue]
  • Then - Actions
  • Unit - Make BallLightning_Caster[BallLightning_CustomValue] Vulnerable
  • Lightning - Destroy BallLightning_Lightning[BallLightning_CustomValue]
  • Unit - Turn collision for BallLightning_Caster[BallLightning_CustomValue] On
  • Animation - Change BallLightning_Caster[BallLightning_CustomValue]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
  • Unit Group - Remove (Picked unit) from BallLightning_DummyGroup
  • Unit - Remove (Picked unit) from the game
  • Special Effect - Destroy BallLightning_SE[BallLightning_CustomValue]
  • Custom script: call RemoveLocation (udg_BallLightning_CasterLoc[udg_BallLightning_CustomValue])
  • Custom script: call DestroyGroup (udg_BallLightning_HitGroup[udg_BallLightning_CustomValue])
  • Else - Actions
  • Custom script: call RemoveLocation (udg_BallLightning_Point[1])
  • Custom script: call RemoveLocation (udg_BallLightning_Point[2])
  • Custom script: call DestroyGroup (udg_BallLightning_UnitGroup)
  • Else - Actions
  • Unit - Make BallLightning_Caster[BallLightning_CustomValue] Vulnerable
  • Lightning - Destroy BallLightning_Lightning[BallLightning_CustomValue]
  • Unit - Turn collision for BallLightning_Caster[BallLightning_CustomValue] On
  • Animation - Change BallLightning_Caster[BallLightning_CustomValue]'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
  • Unit Group - Remove (Picked unit) from BallLightning_DummyGroup
  • Unit - Remove (Picked unit) from the game
  • Special Effect - Destroy BallLightning_SE[BallLightning_CustomValue]
  • Custom script: call RemoveLocation (udg_BallLightning_CasterLoc[udg_BallLightning_CustomValue])
  • Custom script: call DestroyGroup (udg_BallLightning_HitGroup[udg_BallLightning_CustomValue])
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
  • If - Conditions
  • (Number of units in BallLightning_DummyGroup) Equal to 0
  • Then - Actions
  • Trigger - Turn off (This trigger)
  • Else - Actions

SetUnit X/Y has been used to prevent the stopping of current order when the unit is travelling with ball lightning.

Thx, but that is the same trigger in my map, i took the trigger from him =D
 
Status
Not open for further replies.
Top