• 🏆 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!

JeffQ's Basic Chain System v2.00f (MUI/GUI)

Created by JeffQ a.k.a JeffreyQ, SmileyJeff
Version distributed by other people are edited and not by me.

I recommend all users who downloaded this to re-download as i revamp the chain system and it is alot alot more polish now than before and more flexible as i remove the ChainEffect ability creation limitation. Cheers~

1. Please do give credits if you use this in your map.
2. This is fully MUI/GUI using indexing
3. Supports alot of things (Atleast those chain ideas that i got for my map)


Q: Why is it version 1.11 as this is your 1st version?
A: Because i edited 11 times before removing all of the bugs and finally submitting this polish version (So far no bugs i found yet)

Q: Why is the picture you used for this system so ugly?
A: Sorry, my photoshop sucks ]:

Additional Knowledge to Use this System
- Object Editor (Unit/Ability/Buff)

Q: Why do i need to know the object editor?
A: I base alot of things on it. And to create effects you need to use it.

Q: Why do i want to use this?
A: Its easy to use. You can customize alot of things, from damage, to jump count, jump delay between chains. Hit both ally and enemy, steal gold, mana, health, damage add your own effects etc. etc.


How to Implement?

***You can also download the map, the below step by step tutorial is included in the map's README

======================
How to Use?
======================
If your map is a New Map without any triggers:
1. Open JeffQ's Basic Chain System map.
2. Open Trigger Editor.
3. File > Export Triggers.
4. Open your map.
5. Open Trigger Editor.
6. File > Import Triggers.
7. Remember to copy the Dummy over too.

OR

If your map has existing triggers:
1. Open JeffQ's Basic Chain System map.
2. Copy JeffQ's Chain System folder by right-clicking it and select Copy.
3. Open your map.
4. File > Preference > Check "Automatically create unknown variables while pasting trigger data".
5. Open Object Editor. Create a Dummy base on anything, name it Dummy and give it locust and remove its model. Or just copy the dummy from my map.
6. Open Trigger Editor.
7. Right click on the Map Name, or any other trigger/category/comments, and select Paste.
8. Create a variable by pressing CTRL+B and name it QJCS_ChainZ of type Real, array size of 1.
9. Go to "Chain Create" Trigger, find any Disabled Actions, enable it by right clicking and check Enable.
10.Go to "Chain Jump" Trigger, find any Disabled Actions, enable it by right clicking and check Enable.
11.Go to "Chain effect" Trigger, find any Disabled Actions, enable it by right clicking and check Enable.



Limitations
Q: What?! There are limitations?
A: Only Stun and Slow ability have limitations. This is because i order the dummy to human - storm bolt and human sorc - slow in the system.

Flexibility
I did say this system is very flexible except for the few limitations. Which are actually rules you have to follow to use this system. Try any combinations you want and let me know what results you get [: Almost everything stacks.



Briefly what it supports, detail explanation in README in the map.

- Damage enemies
- Heal Allies
- Steal Health
- Steal Mana
- Steal Gold
- Slow
- Stun
- Target Unit
- Target Point
- No Target
- MUI
- And many many more!


Currently In Map Spells:
- Chain Lightning (Typical with red lightning effect)
- Chain Heal (Heals ally and damage enemy)
- Chain Nova (AoE damage and slows enemy)
- Chain Steal (Steals enemy gold and transfer to self)
- Chain Siphon (Steal health and mana and transfer to self)
- Chain Sleep (Makes enemy sleep, wake on hit)
- Chain Polymorph (Change enemy units into random critters) new!
- Chain Invisibility (Change ally units to invisible) new!



=====================
Bugs & FeedBacks
=====================
If you find any bugs please send an email to [email protected] or post a comment here.


**Enjoy using [:

EDIT: OPS! forgot the code, here is it. Thanks for reminding me baassee.


  • Chain Globals
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • -------- DON'T TOUCH ANYTHING HERE --------
      • -------- Locust --------
      • -------- This variable is to make sure chain won't jump to units who have this ability --------
      • Custom script: set udg_QJCS_Locust = 'Aloc'



  • Chain Create
    • Events
    • Conditions
    • Actions
      • -------- DON'T TOUCH ANYTHING HERE --------
      • -------- 1 is to check how many spells are running. 2 is for storage --------
      • -------- If empty instances, run trigger, so that when it is above 1, it keep calling it to turn on. --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • QJCS_index[1] Equal to 0
        • Then - Actions
          • Trigger - Turn on Chain Jump <gen>
        • Else - Actions
      • -------- -------------------------------------------------------------- --------
      • -------- temp Position of caster for other usage --------
      • Set QJCS_tempPos[1] = (Position of QJC_Caster)
      • -------- -------------------------------------------------------------- --------
      • -------- Limitations --------
      • -------- Jump Count Limit Check --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • QJC_JumpCount Less than or equal to 0
        • Then - Actions
          • Set QJC_JumpCount = 1
        • Else - Actions
      • -------- Target Unit Limitations --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • QJC_NoTarget Equal to True
        • Then - Actions
          • -------- If No Target, get nearest target around caster --------
          • Set QJCS_tempGroup = (Units within QJC_JumpRadius of QJCS_tempPos[1] matching (((((Matching unit) is alive) Equal to True) and ((Level of QJCS_Locust for (Matching unit)) Equal to 0)) and ((((Matching unit) belongs to an enemy of (Owner of QJC_Caster)) Equal to QJC_Enemy) or (((M
          • Set QJC_TargetUnit = (Random unit from QJCS_tempGroup)
          • Custom script: call DestroyGroup(udg_QJCS_tempGroup)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • QJC_TargetUnit Equal to No unit
            • Then - Actions
              • Set QJCS_tempGroup = (Units within QJC_JumpRadius of QJC_TargetPoint matching (((((Matching unit) is alive) Equal to True) and ((Level of QJCS_Locust for (Matching unit)) Equal to 0)) and ((((Matching unit) belongs to an enemy of (Owner of QJC_Caster)) Equal to QJC_Enemy) or (((M
              • Set QJC_TargetUnit = (Random unit from QJCS_tempGroup)
              • Custom script: call DestroyGroup(udg_QJCS_tempGroup)
              • Custom script: call RemoveLocation(udg_QJC_TargetPoint)
            • Else - Actions
      • -------- if Reduction Limit > 1.00 = 100% --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • QJC_AmountReduce Greater than 1.00
        • Then - Actions
          • Set QJC_AmountReduce = 1.00
        • Else - Actions
      • -------- Reduction Limit < 0.00 = 0% --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • QJC_AmountReduce Less than 0.00
        • Then - Actions
          • Set QJC_AmountReduce = 0.00
        • Else - Actions
      • -------- if Ally and Enemy = False --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • QJC_Ally Equal to False
              • QJC_Enemy Equal to False
        • Then - Actions
          • Set QJC_Enemy = True
        • Else - Actions
      • -------- Jump Delay Time Max = 1.00 --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • QJC_JumpDelayTime Greater than 1.00
        • Then - Actions
          • Set QJC_JumpDelayTime = 1.00
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • QJC_JumpDelayTime Less than 0.00
        • Then - Actions
          • Set QJC_JumpDelayTime = 0.00
        • Else - Actions
      • -------- -------------------------------------------------------------- --------
      • -------- Increase Index 1 and 2 --------
      • Set QJCS_index[1] = (QJCS_index[1] + 1)
      • Set QJCS_index[2] = (QJCS_index[2] + 1)
      • -------- Store User Data to index 2 --------
      • -------- Caster --------
      • Set QJCS_Caster[QJCS_index[2]] = QJC_Caster
      • -------- Victim --------
      • Set QJCS_TargetUnit[QJCS_index[2]] = QJC_TargetUnit
      • -------- Priority --------
      • Set QJCS_Priority[QJCS_index[2]] = QJC_Priority
      • -------- OnePerUnit (OPU) --------
      • Set QJCS_OnePerUnit[QJCS_index[2]] = QJC_OnePerUnit
      • -------- Types --------
      • Set QJCS_Damage[QJCS_index[2]] = QJC_Damage
      • Set QJCS_Heal[QJCS_index[2]] = QJC_Heal
      • Set QJCS_Health[QJCS_index[2]] = QJC_Heatlh
      • Set QJCS_Mana[QJCS_index[2]] = QJC_Mana
      • Set QJCS_Gold[QJCS_index[2]] = QJC_Gold
      • Set QJCS_Leech[QJCS_index[2]] = QJC_Leech
      • -------- Target Types --------
      • Set QJCS_Ally[QJCS_index[2]] = QJC_Ally
      • Set QJCS_Enemy[QJCS_index[2]] = QJC_Enemy
      • -------- Amount of Damage/Heal/Health/Mana/Gold --------
      • Set QJCS_Amount[QJCS_index[2]] = QJC_Amount
      • -------- Attack & Damage Type --------
      • Set QJCS_AttackType[QJCS_index[2]] = QJC_AttackType
      • Set QJCS_DamageType[QJCS_index[2]] = QJC_DamageType
      • -------- Damage Reduction --------
      • Set QJCS_AmountReduce[QJCS_index[2]] = QJC_AmountReduce
      • -------- Jump Count --------
      • Set QJCS_JumpCount[QJCS_index[2]] = QJC_JumpCount
      • -------- Jump Delay --------
      • Set QJCS_JumpDelayTime[QJCS_index[2]] = QJC_JumpDelayTime
      • -------- Jump Radius --------
      • Set QJCS_JumpRadius[QJCS_index[2]] = QJC_JumpRadius
      • -------- Save AoE --------
      • Set QJCS_AoE[QJCS_index[2]] = QJC_AoE
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • QJCS_AoE[QJCS_index[2]] Equal to True
        • Then - Actions
          • Set QJCS_AoERadius[QJCS_index[2]] = QJC_AoERadius
        • Else - Actions
      • -------- Save SFX --------
      • Set QJCS_ChainSFX[QJCS_index[2]] = QJC_ChainSFX
      • Set QJCS_TargetSFX[QJCS_index[2]] = QJC_TargetSFX
      • -------- Save Slow --------
      • Set QJCS_Slow[QJCS_index[2]] = QJC_Slow
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • QJCS_Slow[QJCS_index[2]] Equal to True
        • Then - Actions
          • Set QJCS_SlowEffect[QJCS_index[2]] = QJC_SlowEffect
        • Else - Actions
      • -------- Save Stun --------
      • Set QJCS_Stun[QJCS_index[2]] = QJC_Stun
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • QJCS_Stun[QJCS_index[2]] Equal to True
        • Then - Actions
          • Set QJCS_StunEffect[QJCS_index[2]] = QJC_StunEffect
        • Else - Actions
      • -------- Save System Time & System Jump Count --------
      • Set QJCS_SystemCount[QJCS_index[2]] = 0
      • Set QJCS_SystemTime[QJCS_index[2]] = 0.00
      • -------- Create dGroup --------
      • Custom script: set udg_QJCS_dGroup[udg_QJCS_index[2]] = CreateGroup()
      • -------- Create Base Dummy --------
      • Unit - Create 1 Dummy for (Owner of QJC_Caster) at QJCS_tempPos[1] facing Default building facing degrees
      • Set QJCS_baseDummy[QJCS_index[2]] = (Last created unit)
      • -------- Add dummy to group --------
      • Unit Group - Add (Last created unit) to QJCS_dummyGroup
      • -------- Clear --------
      • Custom script: call RemoveLocation(udg_QJCS_tempPos[1])



  • Chain Jump
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • -------- DON'T TOUCH ANYTHING HERE. --------
      • -------- index 3 is to keep track of things going on. --------
      • For each (Integer QJCS_index[3]) from 1 to QJCS_index[2], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (QJCS_baseDummy[QJCS_index[3]] is in QJCS_dummyGroup) Equal to True
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • QJCS_JumpCount[QJCS_index[3]] Greater than 0
                  • QJCS_TargetUnit[QJCS_index[3]] Not equal to No unit
                • Then - Actions
                  • -------- Time Check --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • QJCS_SystemTime[QJCS_index[3]] Greater than or equal to QJCS_JumpDelayTime[QJCS_index[3]]
                    • Then - Actions
                      • -------- -------------------------------------------------------------- --------
                      • -------- -------------------------------------------------------------- --------
                      • -------- Chain Effect --------
                      • -------- Position Source for Lightning Creation --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • QJCS_SystemCount[QJCS_index[3]] Equal to 0
                        • Then - Actions
                          • Set QJCS_tempPos[4] = (Position of QJCS_Caster[QJCS_index[3]])
                        • Else - Actions
                          • Set QJCS_tempPos[4] = (Position of QJCS_prevTarget[QJCS_index[3]])
                      • -------- Lightning Effect Index --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • QJCS_LightningIndex[1] Equal to 0
                        • Then - Actions
                          • Trigger - Turn on Chain Effect <gen>
                        • Else - Actions
                      • Set QJCS_LightningIndex[1] = (QJCS_LightningIndex[1] + 1)
                      • Set QJCS_LightningIndex[2] = (QJCS_LightningIndex[2] + 1)
                      • -------- Get Lightning Target --------
                      • Set QJCS_LightningTarget[QJCS_LightningIndex[2]] = QJCS_TargetUnit[QJCS_index[3]]
                      • -------- Lightning Duration --------
                      • Set QJCS_LightningDur[QJCS_LightningIndex[2]] = 1.00
                      • -------- Position Target for Lightning Creation --------
                      • Set QJCS_tempPos[5] = (Position of QJCS_TargetUnit[QJCS_index[3]])
                      • -------- Get Unit of Previous --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • QJCS_SystemCount[QJCS_index[3]] Equal to 0
                        • Then - Actions
                          • Set QJCS_LightningDPos[QJCS_LightningIndex[2]] = QJCS_Caster[QJCS_index[3]]
                        • Else - Actions
                          • Set QJCS_LightningDPos[QJCS_LightningIndex[2]] = QJCS_prevTarget[QJCS_index[3]]
                      • -------- Chain x1,y1,z1,x2,y2,z2 where z is height --------
                      • Set QJCS_ChainX[1] = (X of QJCS_tempPos[4])
                      • Set QJCS_ChainY[1] = (Y of QJCS_tempPos[4])
                      • Custom script: set udg_QJCS_ChainZ[1] = GetLocationZ(udg_QJCS_tempPos[4]) + GetUnitFlyHeight(udg_QJCS_LightningDPos[udg_QJCS_LightningIndex[2]]) + 25
                      • Set QJCS_ChainX[2] = (X of QJCS_tempPos[5])
                      • Set QJCS_ChainY[2] = (Y of QJCS_tempPos[5])
                      • Custom script: set udg_QJCS_ChainZ[2] = GetLocationZ(udg_QJCS_tempPos[5]) + GetUnitFlyHeight(udg_QJCS_TargetUnit[udg_QJCS_index[3]]) + 25
                      • -------- Create and Store Lightning SFX --------
                      • Custom script: set udg_QJCS_LightningSFX[udg_QJCS_LightningIndex[2]] = AddLightningEx( udg_QJCS_ChainSFX[udg_QJCS_index[3]] , true , udg_QJCS_ChainX[1] , udg_QJCS_ChainY[1] , udg_QJCS_ChainZ[1] , udg_QJCS_ChainX[2] , udg_QJCS_ChainY[2] , udg_QJCS_ChainZ[2])
                      • -------- Clear Pos --------
                      • Custom script: call RemoveLocation(udg_QJCS_tempPos[4])
                      • Custom script: call RemoveLocation(udg_QJCS_tempPos[5])
                      • -------- -------------------------------------------------------------- --------
                      • -------- -------------------------------------------------------------- --------
                      • -------- Target SFX --------
                      • Special Effect - Create a special effect attached to the origin of QJCS_TargetUnit[QJCS_index[3]] using QJCS_TargetSFX[QJCS_index[3]]
                      • Special Effect - Destroy (Last created special effect)
                      • -------- Get Target Position --------
                      • Set QJCS_tempPos[2] = (Position of QJCS_TargetUnit[QJCS_index[3]])
                      • -------- AoE --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • QJCS_AoE[QJCS_index[3]] Equal to True
                        • Then - Actions
                          • -------- Set Group --------
                          • -------- CHANGE TO TARGET POS --------
                          • Set QJCS_aGroup[QJCS_index[3]] = (Units within QJCS_AoERadius[QJCS_index[3]] of QJCS_tempPos[2] matching (((((Matching unit) is alive) Equal to True) and ((((Matching unit) is A structure) Equal to False) and ((Level of QJCS_Locust for (Matching unit)) Equal to 0))) and ((((Matching unit) be
                        • Else - Actions
                          • Set QJCS_aGroup[QJCS_index[3]] = (Units within QJCS_JumpRadius[QJCS_index[3]] of QJCS_tempPos[2] matching ((((Matching unit) is alive) Equal to True) and ((Matching unit) Equal to QJCS_TargetUnit[QJCS_index[3]])))
                      • -------- Damage --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • QJCS_Damage[QJCS_index[3]] Equal to True
                        • Then - Actions
                          • Unit Group - Pick every unit in QJCS_aGroup[QJCS_index[3]] and do (Actions)
                            • Loop - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • And - All (Conditions) are true
                                    • Conditions
                                      • ((Picked unit) belongs to an enemy of (Owner of QJCS_Caster[QJCS_index[3]])) Equal to True
                                      • QJCS_Enemy[QJCS_index[3]] Equal to True
                                • Then - Actions
                                  • Unit - Cause QJCS_Caster[QJCS_index[3]] to damage (Picked unit), dealing QJCS_Amount[QJCS_index[3]] damage of attack type QJCS_AttackType[QJCS_index[3]] and damage type QJCS_DamageType[QJCS_index[3]]
                                • Else - Actions
                        • Else - Actions
                      • -------- Heal --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • QJCS_Heal[QJCS_index[3]] Equal to True
                        • Then - Actions
                          • Unit Group - Pick every unit in QJCS_aGroup[QJCS_index[3]] and do (Actions)
                            • Loop - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • ((Picked unit) belongs to an ally of (Owner of QJCS_Caster[QJCS_index[3]])) Equal to True
                                • Then - Actions
                                  • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) + QJCS_Amount[QJCS_index[3]])
                                • Else - Actions
                        • Else - Actions
                      • -------- Health --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • QJCS_Health[QJCS_index[3]] Equal to True
                        • Then - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • QJCS_Leech[QJCS_index[3]] Equal to True
                            • Then - Actions
                              • Unit Group - Pick every unit in QJCS_aGroup[QJCS_index[3]] and do (Actions)
                                • Loop - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • And - All (Conditions) are true
                                        • Conditions
                                          • (Life of (Picked unit)) Greater than QJCS_Amount[QJCS_index[3]]
                                    • Then - Actions
                                      • -------- Increase Caster's Health --------
                                      • Unit - Set life of QJCS_Caster[QJCS_index[3]] to ((Life of QJCS_Caster[QJCS_index[3]]) + QJCS_Amount[QJCS_index[3]])
                                    • Else - Actions
                                      • -------- Increase Caster's Health --------
                                      • Unit - Set life of QJCS_Caster[QJCS_index[3]] to ((Life of QJCS_Caster[QJCS_index[3]]) + (Life of (Picked unit)))
                            • Else - Actions
                          • -------- Do Damage --------
                          • Unit Group - Pick every unit in QJCS_aGroup[QJCS_index[3]] and do (Actions)
                            • Loop - Actions
                              • Unit - Cause QJCS_Caster[QJCS_index[3]] to damage (Picked unit), dealing QJCS_Amount[QJCS_index[3]] damage of attack type QJCS_AttackType[QJCS_index[3]] and damage type QJCS_DamageType[QJCS_index[3]]
                        • Else - Actions
                      • -------- Mana --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • QJCS_Mana[QJCS_index[3]] Equal to True
                        • Then - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • QJCS_Leech[QJCS_index[3]] Equal to True
                            • Then - Actions
                              • Unit Group - Pick every unit in QJCS_aGroup[QJCS_index[3]] and do (Actions)
                                • Loop - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Mana of (Picked unit)) Greater than QJCS_Amount[QJCS_index[3]]
                                    • Then - Actions
                                      • -------- Increase Caster's Mana --------
                                      • Unit - Set mana of QJCS_Caster[QJCS_index[3]] to ((Mana of QJCS_Caster[QJCS_index[3]]) + QJCS_Amount[QJCS_index[3]])
                                    • Else - Actions
                                      • -------- Increase Caster's Mana --------
                                      • Unit - Set mana of QJCS_Caster[QJCS_index[3]] to ((Mana of QJCS_Caster[QJCS_index[3]]) + (Mana of (Picked unit)))
                            • Else - Actions
                          • -------- Reduce Enemy Mana --------
                          • Unit Group - Pick every unit in QJCS_aGroup[QJCS_index[3]] and do (Actions)
                            • Loop - Actions
                              • Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) - QJCS_Amount[QJCS_index[3]])
                        • Else - Actions
                      • -------- Gold --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • QJCS_Gold[QJCS_index[3]] Equal to True
                        • Then - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • QJCS_Leech[QJCS_index[3]] Equal to True
                            • Then - Actions
                              • Unit Group - Pick every unit in QJCS_aGroup[QJCS_index[3]] and do (Actions)
                                • Loop - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • ((Owner of (Picked unit)) Current gold) Greater than (Integer(QJCS_Amount[QJCS_index[3]]))
                                    • Then - Actions
                                      • Player - Add (Integer(QJCS_Amount[QJCS_index[3]])) to (Owner of QJCS_Caster[QJCS_index[3]]) Current gold
                                    • Else - Actions
                                      • Player - Add ((Owner of (Picked unit)) Current gold) to (Owner of QJCS_Caster[QJCS_index[3]]) Current gold
                            • Else - Actions
                          • -------- Deduct Gold --------
                          • Unit Group - Pick every unit in QJCS_aGroup[QJCS_index[3]] and do (Actions)
                            • Loop - Actions
                              • Player - Add (-1 x (Integer(QJCS_Amount[QJCS_index[3]]))) to (Owner of (Picked unit)) Current gold
                        • Else - Actions
                      • -------- Slow --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • QJCS_Slow[QJCS_index[3]] Equal to True
                        • Then - Actions
                          • Unit Group - Pick every unit in QJCS_aGroup[QJCS_index[3]] and do (Actions)
                            • Loop - Actions
                              • Set QJCS_tempPos[3] = (Position of (Picked unit))
                              • Unit - Create 1 Dummy for (Owner of QJCS_Caster[QJCS_index[3]]) at QJCS_tempPos[3] facing Default building facing degrees
                              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                              • Unit - Add QJCS_SlowEffect[QJCS_index[3]] to (Last created unit)
                              • Unit - Order (Last created unit) to Human Sorceress - Slow (Picked unit)
                              • Custom script: call RemoveLocation(udg_QJCS_tempPos[3])
                        • Else - Actions
                      • -------- Stun --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • QJCS_Stun[QJCS_index[3]] Equal to True
                        • Then - Actions
                          • Unit Group - Pick every unit in QJCS_aGroup[QJCS_index[3]] and do (Actions)
                            • Loop - Actions
                              • Set QJCS_tempPos[3] = (Position of (Picked unit))
                              • Unit - Create 1 Dummy for (Owner of QJCS_Caster[QJCS_index[3]]) at QJCS_tempPos[3] facing Default building facing degrees
                              • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                              • Unit - Add QJCS_StunEffect[QJCS_index[3]] to (Last created unit)
                              • Unit - Order (Last created unit) to Human Mountain King - Storm Bolt (Picked unit)
                              • Custom script: call RemoveLocation(udg_QJCS_tempPos[3])
                        • Else - Actions
                      • -------- Clear --------
                      • Custom script: call DestroyGroup(udg_QJCS_aGroup[udg_QJCS_index[3]])
                      • -------- -------------------------------------------------------------- --------
                      • -------- -------------------------------------------------------------- --------
                      • -------- Update System Jump Count --------
                      • Set QJCS_SystemCount[QJCS_index[3]] = (QJCS_SystemCount[QJCS_index[3]] + 1)
                      • -------- Update Jump Count --------
                      • Set QJCS_JumpCount[QJCS_index[3]] = (QJCS_JumpCount[QJCS_index[3]] - 1)
                      • -------- UPDATE Amount --------
                      • Set QJCS_Amount[QJCS_index[3]] = (QJCS_Amount[QJCS_index[3]] - (QJCS_Amount[QJCS_index[3]] x QJCS_AmountReduce[QJCS_index[3]]))
                      • -------- Get Previous Target --------
                      • Set QJCS_prevTarget[QJCS_index[3]] = QJCS_TargetUnit[QJCS_index[3]]
                      • -------- Check if its OPU --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • QJCS_OnePerUnit[QJCS_index[3]] Equal to True
                        • Then - Actions
                          • -------- Store Victim in to individual damagedGroup --------
                          • Unit Group - Add QJCS_TargetUnit[QJCS_index[3]] to QJCS_dGroup[QJCS_index[3]]
                          • -------- Set new VictimGroup with Damaged Group in condition --------
                          • Set QJCS_victimGroup = (Units within QJCS_JumpRadius[QJCS_index[3]] of QJCS_tempPos[2] matching (((((Matching unit) is alive) Equal to True) and (((Matching unit) Not equal to QJCS_TargetUnit[QJCS_index[3]]) and ((((Matching unit) is in QJCS_dGroup[QJCS_index[3]]) Equal to False) a
                        • Else - Actions
                          • -------- Set new VictimGroup --------
                          • Set QJCS_victimGroup = (Units within QJCS_JumpRadius[QJCS_index[3]] of QJCS_tempPos[2] matching (((((Matching unit) is alive) Equal to True) and (((Matching unit) Not equal to QJCS_TargetUnit[QJCS_index[3]]) and ((Level of QJCS_Locust for (Matching unit)) Equal to 0))) and ((((Matc
                      • -------- Get Next Target --------
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Number of units in QJCS_victimGroup) Greater than 0
                        • Then - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • QJCS_Priority[QJCS_index[3]] Equal to True
                            • Then - Actions
                              • -------- Get Lowest Health --------
                              • Unit Group - Pick every unit in QJCS_victimGroup and do (Actions)
                                • Loop - Actions
                                  • Set QJCS_currUnit = (Picked unit)
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Life of QJCS_currUnit) Less than (Life of QJCS_TargetUnit[QJCS_index[3]])
                                    • Then - Actions
                                      • Set QJCS_TargetUnit[QJCS_index[3]] = QJCS_currUnit
                                    • Else - Actions
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • (QJCS_TargetUnit[QJCS_index[3]] is in QJCS_victimGroup) Equal to True
                                        • Then - Actions
                                          • Set QJCS_TargetUnit[QJCS_index[3]] = QJCS_TargetUnit[QJCS_index[3]]
                                        • Else - Actions
                                          • Set QJCS_TargetUnit[QJCS_index[3]] = QJCS_currUnit
                            • Else - Actions
                              • -------- No priority, meaning random choose --------
                              • Set QJCS_TargetUnit[QJCS_index[3]] = (Random unit from QJCS_victimGroup)
                        • Else - Actions
                          • -------- Set Jump Count to 0 to end it, because there is no more units nearby to hit --------
                          • Set QJCS_JumpCount[QJCS_index[3]] = 0
                      • -------- Reset System Time --------
                      • Set QJCS_SystemTime[QJCS_index[3]] = 0.00
                      • -------- Clear --------
                      • Custom script: call DestroyGroup(udg_QJCS_victimGroup)
                      • Custom script: call RemoveLocation(udg_QJCS_tempPos[2])
                    • Else - Actions
                      • -------- Update System Time --------
                      • Set QJCS_SystemTime[QJCS_index[3]] = (QJCS_SystemTime[QJCS_index[3]] + 0.03)
                • Else - Actions
                  • -------- Out of Count, End --------
                  • Custom script: call DestroyGroup(udg_QJCS_dGroup[udg_QJCS_index[3]])
                  • -------- Kill and Remove Base Dummy --------
                  • Unit Group - Remove QJCS_baseDummy[QJCS_index[3]] from QJCS_dummyGroup
                  • Unit - Kill QJCS_baseDummy[QJCS_index[3]]
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • QJCS_OnePerUnit[QJCS_index[3]] Equal to True
                    • Then - Actions
                      • Unit Group - Remove all units from QJCS_dGroup[QJCS_index[3]]
                    • Else - Actions
                  • -------- Reduce Index 1 by 1 to let it know 1 spell has ended --------
                  • Set QJCS_index[1] = (QJCS_index[1] - 1)
                  • -------- Check if index 1 is 0, if it is 0, there is no active spell running --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • QJCS_index[1] Equal to 0
                    • Then - Actions
                      • Set QJCS_index[2] = 0
                      • Trigger - Turn off (This trigger)
                    • Else - Actions
            • Else - Actions
              • -------- Do Nothing Here --------



  • Chain Effect
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • -------- DON'T TOUCH ANYTHING HERE. --------
      • For each (Integer QJCS_LightningIndex[3]) from 1 to QJCS_LightningIndex[2], do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • QJCS_LightningDur[QJCS_LightningIndex[3]] Greater than 0.00
            • Then - Actions
              • -------- Lightning Duration --------
              • Set QJCS_LightningDur[QJCS_LightningIndex[3]] = (QJCS_LightningDur[QJCS_LightningIndex[3]] - 0.03)
              • -------- Get Position --------
              • Set QJCS_LightningPos[1] = (Position of QJCS_LightningDPos[QJCS_LightningIndex[3]])
              • Set QJCS_LightningPos[2] = (Position of QJCS_LightningTarget[QJCS_LightningIndex[3]])
              • -------- Get x1,y1,x2,y2 --------
              • Set QJCS_ChainX[3] = (X of QJCS_LightningPos[1])
              • Set QJCS_ChainY[3] = (Y of QJCS_LightningPos[1])
              • Custom script: set udg_QJCS_ChainZ[3] = GetLocationZ(udg_QJCS_LightningPos[1]) + GetUnitFlyHeight(udg_QJCS_LightningDPos[udg_QJCS_LightningIndex[3]]) + 25
              • Set QJCS_ChainX[4] = (X of QJCS_LightningPos[2])
              • Set QJCS_ChainY[4] = (Y of QJCS_LightningPos[2])
              • Custom script: set udg_QJCS_ChainZ[4] = GetLocationZ(udg_QJCS_LightningPos[2]) + GetUnitFlyHeight(udg_QJCS_LightningTarget[udg_QJCS_LightningIndex[3]]) + 25
              • -------- Move Lightning --------
              • Custom script: call MoveLightningEx(udg_QJCS_LightningSFX[udg_QJCS_LightningIndex[3]] , true , udg_QJCS_ChainX[3] , udg_QJCS_ChainY[3] , udg_QJCS_ChainZ[3] , udg_QJCS_ChainX[4] , udg_QJCS_ChainY[4] , udg_QJCS_ChainZ[4])
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • QJCS_LightningDur[QJCS_LightningIndex[3]] Less than or equal to 0.00
                • Then - Actions
                  • -------- Find a way to let it destroy once. --------
                  • Lightning - Destroy QJCS_LightningSFX[QJCS_LightningIndex[3]]
                  • Set QJCS_LightningIndex[1] = (QJCS_LightningIndex[1] - 1)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • QJCS_LightningIndex[1] Equal to 0
                    • Then - Actions
                      • Set QJCS_LightningIndex[2] = 0
                      • Trigger - Turn off Chain Effect <gen>
                    • Else - Actions
                • Else - Actions
              • -------- Clear --------
              • Custom script: call RemoveLocation(udg_QJCS_LightningPos[1])
              • Custom script: call RemoveLocation(udg_QJCS_LightningPos[2])
            • Else - Actions




  • Example 2 Chain Nova
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Example 2 - Chain Nova
    • Actions
      • Set QJC_Caster = (Triggering unit)
      • Set QJC_TargetUnit = No unit
      • DISABLED: Set QJC_TargetPoint = (Target point of ability being cast)
      • Set QJC_NoTarget = True
      • Set QJC_Priority = True
      • Set QJC_OnePerUnit = True
      • Set QJC_Damage = True
      • Set QJC_Heal = False
      • Set QJC_Heatlh = False
      • Set QJC_Mana = False
      • Set QJC_Gold = False
      • Set QJC_Leech = False
      • Set QJC_Ally = False
      • Set QJC_Enemy = True
      • Set QJC_Amount = 100.00
      • Set QJC_ChainSFX = Drain Mana
      • Set QJC_TargetSFX = Abilities\Spells\Undead\FrostNova\FrostNovaTarget.mdl
      • Set QJC_AttackType = Chaos
      • Set QJC_DamageType = Universal
      • Set QJC_AmountReduce = 0.00
      • Set QJC_JumpCount = 5
      • Set QJC_JumpDelayTime = 0.10
      • Set QJC_JumpRadius = 500.00
      • Set QJC_Slow = True
      • Set QJC_SlowEffect = Nova (Slow)
      • Set QJC_Stun = False
      • DISABLED: Set QJC_StunEffect = Storm Bolt
      • Set QJC_AoE = True
      • Set QJC_AoERadius = 200.00
      • Trigger - Run Chain Create <gen> (checking conditions)



  • Example 7 Chain Sheep
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Example 7 - Chain Polymorph
    • Actions
      • Set QJC_Caster = (Triggering unit)
      • Set QJC_TargetUnit = (Target unit of ability being cast)
      • DISABLED: Set QJC_TargetPoint = (Target point of ability being cast)
      • Set QJC_NoTarget = False
      • Set QJC_Priority = False
      • Set QJC_OnePerUnit = True
      • Set QJC_Damage = False
      • Set QJC_Heal = False
      • Set QJC_Heatlh = False
      • Set QJC_Mana = False
      • Set QJC_Gold = False
      • Set QJC_Leech = False
      • Set QJC_Ally = False
      • Set QJC_Enemy = True
      • Set QJC_Amount = 0.00
      • Set QJC_ChainSFX = Spirit Link
      • Set QJC_TargetSFX = Abilities\Spells\Human\Polymorph\PolyMorphTarget.mdl
      • Set QJC_AttackType = Chaos
      • Set QJC_DamageType = Universal
      • Set QJC_AmountReduce = 0.00
      • Set QJC_JumpCount = 10
      • Set QJC_JumpDelayTime = 0.10
      • Set QJC_JumpRadius = 500.00
      • Set QJC_Slow = False
      • DISABLED: Set QJC_SlowEffect = Slow
      • Set QJC_Stun = True
      • Set QJC_StunEffect = Sheep (Stun)
      • Set QJC_AoE = False
      • DISABLED: Set QJC_AoERadius = 200.00
      • Set QJC_DummyType = Dummy
      • Trigger - Run Chain Create <gen> (checking conditions)
  • Chain Sheep
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Sheep (Stun)
    • Actions
      • Set dontcopy_tempPos = (Position of (Triggering unit))
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at dontcopythis facing Default building facing degrees
      • Unit - Add Polymorph (Example) to (Triggering unit)
      • Unit - Add a 1.00 second Generic expiration timer to (Triggering unit)
      • Unit - Order (Triggering unit) to Human Sorceress - Polymorph (Target unit of ability being cast)
      • Custom script: call RemoveLocation(udg_dontcopy_tempPos)


Currently Known Issues:
- All Fixed [:


Thanks to the below who shed some light on me about indexing and leaks.
- Kingz
- YourNameHere
- baassee
- Adiktuz
- Maker
- TitanHex
- D4RK_G4ND4LF
- And other people if i miss out.

Special Thanks to Kingz who show me his simple lightning system. I learned alot from it and after understanding i made 1 my own to fit my system. +Rep



v2.00f, 24 Feb 2010
- Chain should no longer jump to buildings/structures.
- Some demo ability can still target buildings, this is because i didn't limit the target allowed at the ability editor. (Nothing to do with the system)

v2.00e, 31 Jan 2010
- Fix lightning height to match cliff or raised terrain.
- Added a raised terrain and cliff to test out.

v2.00d, 25 Jan 2010
- Rearrange Folder for easier implementing in other maps.
- Updated "How To Use" in the README to give a step by step tutorial on how to implement. Please do give it a read.

v2.00c, 24 Jan 2010
- Chain now gets unit height +25. Meaning that if you target a flying unit, the chain height will change accordingly.
- Added a few flying units to let you try out the dynamic chain height.
- Added Chain Globals Trigger to store Locust.
- Chain should now only jump to units that doesn't have locust (This should remove the limitation of where you need to only base all other ability dummies on my dummy as long as your custom dummies have locust).

v2.00b, 23 Jan 2010
- Lightning effect now won't stick to ground.

v2.00a, 23 Jan 2010
- Fix 2 major bugs that make the chain not MUI for chain effect and Stun effect. Due to setting the wrong index. Now it has been fixed and should no longer containt any more bugs! Thanks to my sis for testing out this with me [:

v2.00, 22 Jan 2010
- v2.00, 22 Jan 2010
- Revamp the chain effect system.
- Remove dummy type. You still have to copy the dummy to your map though.
- Remove finger of death limitations. Now you can choose your chain effect freely.
- Added a new Chain Effect Trigger.
- This allows the chain to follow the unit if it is moving.
- Polish code.
- Fixed a few bugs in code.
- Added Implementation Details Trigger and tidy up the Example 1-8 Implementations.
- Removed all (SFX) ability as now you can use the QJC_ChainSFX to set your lightning effect.
- Chain effect should look way more nicer now [:

v1.14, 22 Jan 2010
- Added 2 new abilities chain sheep and chain invisible to show the flexibility of this system and how to play around with stun/slow effect to your advantages.

v1.13a, 22 Jan 2010
- Added a sleep ability in the implementation after Kingz asked me what if he wanted to create a chain sleep. (No additional system code added).
- Fix several bugs.

v1.12, 21 Jan 2010
- Periodic Time change to 0.03seconds. And System Time update + 0.03 from 0.01.

v1.11a, 21 Jan 2010
- Fixed Implementation Example Comment for Chain Effect.

v1.11, 21 Jan 2010
- Initial Release.


Keywords:
chain, system, target, unit, point, no target, gui, mui, index, spell, pack, nova, slow, stun, gold, steal, lightning, siphon, damage, heal, sheep, in
Contents

JeffQ's Basic Chain System v2.00f (Map)

Reviews
20:00, 21st Jan 2010 The_Reborn_Devil: The triggering looks ok and there's nothing wrong that I can see. Status: Approved Rating: Useful

Moderator

M

Moderator

20:00, 21st Jan 2010
The_Reborn_Devil:
The triggering looks ok and there's nothing wrong that I can see.

Status: Approved
Rating: Useful
 
Level 9
Joined
Sep 28, 2004
Messages
365
I will work on vJASS once i finish converting my missile system to indexing [: I will need to take some time to learn vJASS.

Also updated with 1 example implementation code.
Note that when i add DISABLED: ......... infront, it means it is disable in the trigger.
 
Level 25
Joined
Jun 5, 2008
Messages
2,572
*sigh* I just realized that Paladon's Endless chain system is not in the spell section, he must have forgot to save it from the purge.

Anyway far better implementation would be:
  • set a trigger to a system variable
  • every time a chain hits the target execute that trigger

Since you are just throwing out far too much things here, example what if i want a chain spell that puts enemies to sleep?

Wouldn't it be easier if i would just set a Systems Trigger variable to a trigger i want executed (read: a trigger that casts sleep on a target) and then just fetch 2 variables from your system(caster/target units) instead of defining a hundred of booleans?

Also the fact you are basing your system on OE effects is lame, use real counters and GUI lightning.
 
Level 9
Joined
Sep 28, 2004
Messages
365
I will give that a try [: Thanks for the feedback. I am still learning how to make systems more efficient as this is my 2nd system.

I've also tried GUI lightning, but i really fail at that because of creating and destroying. Still can't figure out an array inside an array to store them. What do you mean by real counters?
 
Level 25
Joined
Jun 5, 2008
Messages
2,572
Real counters as in real variables which are used as counters(timers).

You increase their value and later check if it matches the needed value, if yes you do actions and revert them back to 0.

EDIT:

Attached a map with several systems, i suggest you look @ FadeLightning as it fades the lightning and destroys it upon fading, usefull for your system.

If you want i will implement index recycling in it but atm it is only a old submision i once uploaded here on THW.

To sumarize if you decide to use FadeLightning it will automatically destroy the lightning and clean the leaks, you only need to set which lightning you want faded and the duration over which it is faded.
 

Attachments

  • Simple Systemsv1.1.w3x
    67.2 KB · Views: 96
Level 14
Joined
Nov 23, 2008
Messages
512
look like the system that paladon made (i think it's deletet).
i also have a idea store an trigger in the sys and if the chan hits a unit set variabes to the caster, the hitted unit, damage/heal and run the trigger. so everybody can easyly change the effect of the chainlightning (for example: aoe damage and poision;simgle target and dot;....)
 
Level 25
Joined
Jun 5, 2008
Messages
2,572
@Hellgate
Kingz said:
*sigh* I just realized that Paladon's Endless chain system is not in the spell section, he must have forgot to save it from the purge.

Anyway far better implementation would be:

* set a trigger to a system variable
* every time a chain hits the target execute that trigger


Since you are just throwing out far too much things here, example what if i want a chain spell that puts enemies to sleep?

Wouldn't it be easier if i would just set a Systems Trigger variable to a trigger i want executed (read: a trigger that casts sleep on a target) and then just fetch 2 variables from your system(caster/target units) instead of defining a hundred of booleans?

Also the fact you are basing your system on OE effects is lame, use real counters and GUI lightning.

Now compare it to your post:
Hellgate said:
look like the system that paladon made (i think it's deletet).
i also have a idea store an trigger in the sys and if the chan hits a unit set variabes to the caster, the hitted unit, damage/heal and run the trigger. so everybody can easyly change the effect of the chainlightning (for example: aoe damage and poision;simgle target and dot;....)

And now tell me that you just haven't said what i said previously :p
 
Level 9
Joined
Sep 28, 2004
Messages
365
Updated to version 1.13a.

- Added a sleep implementation example spell after kingz asked me what if he wanted to do that.
- Fix several bugs.

Known Issues:
Chain Effect: Graphical issue, if unit is moving, the chain won't be correctly place on the unit. This doesn't affect damage dealt or any other things. Just a graphic issue. I will fix this once i get to use Lightning SFX better.
 
Level 9
Joined
Sep 28, 2004
Messages
365
I know what you mean Kingz. While i am working on what you meant to make users life easier and more flexible for advance users i updated this for basic users.

To show the flexibility of the basic chain system i made. All those you mentioned are possible in the current system and i have updated the map with example implementations. Playing around with slow and stun give many effects.

EDIT: The only thing this system can't do is chain dash. Because of movement, though this is going well in my Missile System.
 
Last edited:
Level 9
Joined
Sep 28, 2004
Messages
365
@Itachi009
Thanks alot [:

v2.00
Revamped Chain Effect System.
- Chains now move with moving units.
- Remove ChainEffect Ability limitation. You can set your lightning effect now.
- No more dummy limitations. But please do copy the dummy over to your map if you are using this.

Hope you all like it [:


After looking for an hour, i still can't figure out what is wrong with the lightning height. Even though i set the QJCS_ChainZ[1] and QJCS_ChainZ[2] to 500, the chain height created is still at 0. What did i do wrong?
  • Set QJCS_ChainX[1] = (X of QJCS_tempPos[4])
  • Set QJCS_ChainY[1] = (Y of QJCS_tempPos[4])
  • Set QJCS_ChainZ[1] = 500.00
  • Set QJCS_ChainX[2] = (X of QJCS_tempPos[5])
  • Set QJCS_ChainY[2] = (Y of QJCS_tempPos[5])
  • Set QJCS_ChainZ[2] = 500.00
  • -------- Create and Store Lightning SFX --------
  • Custom script: set udg_QJCS_LightningSFX[udg_QJCS_LightningIndex[2]] = AddLightningEx( udg_QJCS_ChainSFX[udg_QJCS_index[2]] , true , udg_QJCS_ChainX[1] , udg_QJCS_ChainY[1] , udg_QJCS_ChainZ[1] , udg_QJCS_ChainX[2] , udg_QJCS_ChainY[2] , udg_QJCS_ChainZ[2])
 
Last edited:
Level 25
Joined
Jun 5, 2008
Messages
2,572
I will be happy with this system only when it starts supporting the trigger variables not so much booleans.

Anyway the thing your lightning is bugging:

Z1 = start Z

Z2 = end Z

So for example z1 = 0, z2 = 300 will make the start of the lightning be on the ground while the end will be in the air, 500 height.

Having z1 = z2 will make the lightning both be in air at 500 height.

Also i have no idea what your problem actually is, please clarify better.

EDIT:

I don't like advertising but take a look at the one of the systems in that map i attached earlier.
It is called CreateLightningEx and maybe it can help you solve the issue.
 
Level 9
Joined
Sep 28, 2004
Messages
365
Glad you like it. Thanks for giving it a try [:

EDIT:
Updated to 2.00d.
- A minor update to improve implementing to your maps.
- A step by step tutorial included.

**I've updated my map but the last updated time is still stuck at few days back. Why is this so?
 
Last edited:
Level 9
Joined
Sep 28, 2004
Messages
365
Updated to 2.00e. Thanks D4RK_G4ND4LF for pointing this out. Sorry it took so long for an update. Have been busy with university stuff.

Height of Chain Effect is now correct and perfected:
  • Custom script: set udg_QJCS_ChainZ[1] = GetLocationZ(udg_QJCS_tempPos[4]) + GetUnitFlyHeight(udg_QJCS_LightningDPos[udg_QJCS_LightningIndex[2]]) + 25
  • Custom script: set udg_QJCS_ChainZ[2] = GetLocationZ(udg_QJCS_tempPos[5]) + GetUnitFlyHeight(udg_QJCS_TargetUnit[udg_QJCS_index[3]]) + 25
  • Custom script: set udg_QJCS_ChainZ[3] = GetLocationZ(udg_QJCS_LightningPos[1]) + GetUnitFlyHeight(udg_QJCS_LightningDPos[udg_QJCS_LightningIndex[3]]) + 25
  • Custom script: set udg_QJCS_ChainZ[4] = GetLocationZ(udg_QJCS_LightningPos[2]) + GetUnitFlyHeight(udg_QJCS_LightningTarget[udg_QJCS_LightningIndex[3]]) + 25
Regarding options. Well i design this system to support many chain types. But you have a point there. I might try to combine some stuff to reduce the implementation code but retaining all the features.
 
Last edited:
Level 9
Joined
Jun 25, 2009
Messages
427
Hey Jeff, wanted to ask you in private or just for asking (... :D) Could you make this thingie (the chain thingie) jump multiple times on same unit (like 2 footmen are running you let a chain of them and jumps 8 times (4 on each)?

If you could, post it here or send me in private (i think posting would be nice because i don't think i'm the only one who would love it jumping multiple times)

Tiche3 :grin:
 
Level 9
Joined
Sep 28, 2004
Messages
365
Hey Jeff, wanted to ask you in private or just for asking (... :D) Could you make this thingie (the chain thingie) jump multiple times on same unit (like 2 footmen are running you let a chain of them and jumps 8 times (4 on each)?

If you could, post it here or send me in private (i think posting would be nice because i don't think i'm the only one who would love it jumping multiple times)

Tiche3 :grin:

Absolutely, the option is already in. But they will take turns on the chain though (to put it another way: It will not hit 1 unit 4 times before jumping to another). Just set One Per Unit to False. That is the option limiting it to only jump on each unit once.

The variable name is : QJC_OnePerUnit
 
Last edited:
Level 3
Joined
Mar 6, 2010
Messages
36
If I wanted my chain to target a specific unit, how would I go about doing this.

Also, how about levels of an ability?
 
Last edited:
Level 9
Joined
Sep 28, 2004
Messages
365
@Failenx
That is a good idea, i will add specification on the next version while i am working on making it more efficient right now.

For levels of an ability, what do you mean? If you want the damage to be based on level you have to set the damage formula yourself.
 
Level 8
Joined
Apr 8, 2009
Messages
499
uhmm... i put this in my map, which i edit with the JNGP package, and i can't open the map anymore. (testing in WE, opening in local, opening in single player)

is that because your system uses triggers from later patches?
(as JNGP uses 1.23 or something)
or am i seriously messing up o.o?
 
uhmm... i put this in my map, which i edit with the JNGP package, and i can't open the map anymore. (testing in WE, opening in local, opening in single player)

is that because your system uses triggers from later patches?
(as JNGP uses 1.23 or something)
or am i seriously messing up o.o?

JNGP is compatible up to the latest patch as long as you have the latest jass helper... maybe you just messed something up...
 
Level 8
Joined
Apr 8, 2009
Messages
499
JNGP is compatible up to the latest patch as long as you have the latest jass helper... maybe you just messed something up...

whenever i copy the required folder to my map i can't host it anymore, when i remove it i can.

and JNGP WE is compatible with v1.23 i think o_O but w/e
 
Top