| 05-09-2005, 07:19 AM | #1 |
Guest | Lightning Strike Type: Select a single target Missile speed: Instant Missile type: Lightning (Chain Lightning) Missile duration: All lightnings including the initial one, lasts about 0.5 sec. Auto-casting: No Targets: Enemies (alive of course) Effects: The caster sends out an initial lightning bolt to the target. When the bolt hits it's target it instantly sends a maximum of [variable] number of secondary lightings. Each to its' own target within [variable] radius from the initial target. The initial target and the second targets takes [variable] amount of damage. Also, when the initial target is hit, there should be a fairly large purge buff on the initial target which disappears after its' birth animation ends. Damage, radius and number of secondary lightnings increases with level. History: I have tried 12 more or less different ways to get this working. The first versions seemed good until I discovered that there was no maximum limit of targets. When I fixed that and every thing seemed working as I should, I discovered that the second lightnings targeted dead corpses too and even at rare times the hero it self! I added a condition that made the trigger only allow living non-hero targets. That worked fine... except that the trigger didn't pick any units at all! I discovered that conditions that only allows living units to be picked does not work correctly in Wc3 TFT 1.18. After some time a was able to figure out a way to solve that, a way that was much simpler and better in all ways than the last one but when I thought: Finally! At last the spell works precisely as it should! I discovered that it some times targeted too few units, especially when the maximum number of targets where high, above 10 and when there are lots of enemies near the initial target. But that was not the worst, often when the spell was used, the whole game crashed!! Why? Is my trigger to complicated for game? My trigger did not need much text. Summary of problems: - The game crashes often when the spell is used. - The spell does not affect the correct amount of targets. The trigger PICKS they right amount but AFFECTS too few targets. I know that because I made the trigger display a text every time a unit was picked and the text was shown a correct amount of times but too few units were affected. - In some cases, the lightnings didn't disappear. - In some cases the spell affected allies even when there was an If function with to conditions telling the trigger to just pick enemies and not heroes. Please make this spell for me with JASS. It is impossible to make it work with just triggers. I have proven that to myself. |
| 05-11-2005, 04:26 PM | #2 |
I am so bored I will try to make it, be patient might take me a week to get the time. |
| 05-12-2005, 02:48 AM | #3 |
This is possible without Jass... Multinstanceable: NO Multiplayer: YES Dummy units: You need a different dummy unit for each lvl of the spell Attack damage=damage of secondary hits Use chain lighting like missile to try to mimic the regular lighting effect. _(Text)_ =This is just something i used to point out variables Event: Spell is casted (Purge(New targeted alive, not summon)) Condition: Spell is equal to "Purge" Set target of abillity=__Unit Variable_ If Spell level of triggering unit is equal to 1 then create (Number of units= Number of secondary blasts) Dummy Unit1 at _Unit Variable Add Last created units to _Dummy Unit Group_ (array=1) If Spell level of triggering unit is equal to 2 then create (Number of units= Number of secondary blasts) Dummy Unit2 at _Unit Variable Add Last created units to _Dummy Unit Group_ (array=2) Etc. Set _DUMMY_(unit variable)= random unit from _Dummy Unit Group_ (array=Spell level of triggering unit) >>>Pick every unit in (Units within (Range of Secondary Blasts) of __Unit Variable__) >If unit is not equal to __Unit Variable__ then order _Dummy_ to attack >If unit is not equal to __Unit Variable__ then wait (Time for the attack) >If unit is not equal to __Unit Variable__ then remove _Dummy_ from the game Not neccessary, but does reduce lag is setting variables to null. (Any problems/questions just add a reply)To change the (Range of Secondary Blasts), just make it a integer variable and set it to something different for each lvl. |
| 05-12-2005, 07:14 PM | #4 |
Actually, this has a chance of hitting the same unit twice This can be fixed though... >>>Pick every unit in (Units within (Range of Secondary Blasts) of __Unit Variable__) >If (picked unit)unit is not equal to __Unit Variable__ then order _Dummy_ to attack >If unit is not equal to __Unit Variable__ then wait (Time for the attack) >If unit is not equal to __Unit Variable__ then remove _Dummy_ from the game By changing it to: Set _Effected Unit Group_ = units within (Range of Secondary Blasts) >>>Pick every unit in (Units within (Range of Secondary Blasts) of __Unit Variable__) >If unit is not equal to __Unit Variable__ and unit is in _Effected Unit Group_ then order _Dummy_ to attack (picked unit) >If unit is not equal to __Unit Variable__ and unit is in _Effected Unit Group_ then wait (Time for the attack) >If unit is not equal to __Unit Variable__ and unit is in _Effected Unit Group_then remove _Dummy_ from the game >If unit is not equal to __Unit Variable__ and unit is in _Effected Unit Group_ then remove attacked unit from _Effected Unit Group_ If i have any more improvements, then i will edit... :god_help_us: Did I even help you, because it seems like you didn't read my posts... :( |
| 05-12-2005, 09:20 PM | #5 |
Actually, I just read the request at home, and I think that it would work better if you post the trigger so I can find what is causing the problems |
| 05-13-2005, 06:09 PM | #6 |
Guest | Thank you Lord Vexorian for reading my spell request. Info: There was a bit time since I gave up this spell so I don't remember all the errors for each trigger. But I do remember that none of them worked perfectly. You may find functions that cause memory leak in the triggers since I have no exerience in how to discover or fix such things. I really strange thing is that those (Lightning Strike 1 for example) triggers that orders a dummy to cast Forked Lightning don't work any more. When I created them they worked as they should but now some time later they never cast Forked Lightning. And I have not done any changes in them. When I created all these triggers I didn't understand the use of Experation Timer. Thats why the dummies have negative life regeneration. Some of the trigger may seem to work perfectly on this map but I tried them on my map ETS Forest which is the reals map where I am going to use the spell, and it didn't work as it should when there was a lot of enemies. You know the map Enfo's Team Survival? It's a survival map with lots of enemies so the triggers must be able to handle that. The best way to test if it works would be to test the spell in an ETS map. Multi instanceability is not required but it would be great if the spell had it. The best wore if I could email you the map, but any way here are the best working triggers: ========================================================== Lightning Strike 1 Events Unit - A unit Starts the effect of an ability Conditions (Ability being cast) Equal to Lightning Strike (Real) Actions Unit Group - Pick every unit in (Units within 200.00 of ((Target point of ability being cast) offset by 300.00 towards 180.00 degrees)) and do (Actions) Loop - Actions Unit - Create 1 Lightning Strike Dummy (Purge Buff) for (Owner of (Casting unit)) at (Target point of ability being cast) facing 180.00 degrees Unit - Order (Last created unit) to Neutral Naga Sea Witch - Forked Lightning (Picked unit) ========================================================== Lightning Strike 4 Events Unit - A unit Starts the effect of an ability Conditions (Ability being cast) Equal to Lightning Strike (Real) Actions -------- Create initial lightning and store it -------- Lightning - Create a lightning effect Chain Lightning - Primary (Position of (Casting unit)) (Target point of ability being cast) Set LightningStrike_Initial = (Last created lightning effect) Set LightningStrike_AddNumber = 1 -------- Create all lightnings on units -------- Unit - Create 1 Lightning Strike Dummy (Purge Buff) for Neutral Passive at (Target point of ability being cast) facing Default building facing degrees Animation - Play (Last created unit)'s birth animation For each (Integer A) from 1 to 8, do (Actions) Loop - Actions Unit Group - Pick every unit in (Units within 600.00 of (Target point of ability being cast) matching ((((Picked unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True) and (((Picked unit) is A Hero) Equal to False))) and do (Actions) Loop - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions ((Picked unit) is in LightningStrike_AlreadyHit) Equal to False Then - Actions Unit - Order (Casting unit) to damage (Picked unit) for 100.00 using attack type Spells and damage type Normal. Lightning - Create a lightning effect Chain Lightning - Primary (Target point of ability being cast) (Position of (Picked unit)) Set LightningStrikeTargetLightning[LightningStrike_AddNumber] = (Last created lightning effect) Set LightningStrike_AddNumber = (LightningStrike_AddNumber + 1) Unit Group - Add (Picked unit) to LightningStrike_AlreadyHit Wait 0.01 game-time seconds Else - Actions Do nothing -------- Remove all units already hit by lightning from group -------- Unit Group - Remove all units of LightningStrike_AlreadyHit from LightningStrike_AlreadyHit Wait 0.50 game-time seconds -------- Destroy all target lightnings -------- For each (Integer A) from 1 to 20, do (Actions) Loop - Actions Lightning - Destroy LightningStrikeTargetLightning[LightningStrike_DestroyNumber] Set LightningStrike_DestroyNumber = (LightningStrike_DestroyNumber + 1) -------- Destroy initial lightning -------- Lightning - Destroy LightningStrike_Initial -------- Reset lightning number -------- Set LightningStrike_DestroyNumber = 1 ========================================================== Lightning Strike 5 Events Unit - A unit Starts the effect of an ability Conditions (Ability being cast) Equal to Lightning Strike (Real) Actions Unit Group - Pick every unit in (Units within 500.00 of (Target point of ability being cast)) and do (Actions) Loop - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions ((Picked unit) is dead) Equal to True Then - Actions Unit - Remove (Picked unit) from the game Else - Actions Do nothing Unit Group - Pick every unit in (Random ((Level of Lightning Strike (Real) for (Casting unit)) x 3) units from (Units within 500.00 of (Target point of ability being cast) matching (((Unit-type of (Picked unit)) is A Hero) Equal to False))) and do (Actions) Loop - Actions Unit - Create 1 Lightning Strike Dummy (Spell Lightning) for (Owner of (Casting unit)) at (Target point of ability being cast) facing 0.00 degrees Unit - Set Level of Lightning Strike (dummy1) for (Last created unit) to (Level of Lightning Strike (Real) for (Casting unit)) Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Picked unit) Game - Display to (All players) for 5.00 seconds the text: Unit Picked Wait 0.01 seconds ========================================================== Lightning Strike 6 Events Unit - A unit Starts the effect of an ability Conditions (Ability being cast) Equal to Lightning Strike (Real) Actions Set LightningStrike_Caster = (Casting unit) Set LightningStrike_Owner = (Owner of LightningStrike_Caster) Set LightningStrike_InitialPoint = (Target point of ability being cast) Wait 0.50 game-time seconds Set LightningStrike_Level = (Level of Unknown (A06G) for (Casting unit)) -------- Create initial lightning and store it -------- Lightning - Create a lightning effect Chain Lightning - Primary (Position of LightningStrike_Caster) LightningStrike_InitialPoint Set LightningStrike_Initial = (Last created lightning effect) -------- Create purge buff -------- Unit - Create 1 Lightning Strike Dummy (Purge Buff) for Neutral Passive at LightningStrike_InitialPoint facing Default building facing degrees Animation - Play (Last created unit)'s birth animation Unit Group - Pick every unit in (Units within (((Real(LightningStrike_Level)) x 50.00) + 200.00) of LightningStrike_InitialPoint) and do (Actions) Loop - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions ((Picked unit) is dead) Equal to True Then - Actions Unit - Remove (Picked unit) from the game Else - Actions Do nothing -------- Pick units to be affected -------- Unit Group - Pick every unit in (Random (LightningStrike_Level + 3) units from (Units within (((Real(LightningStrike_Level)) x 50.00) + 200.00) of LightningStrike_InitialPoint matching ((((Picked unit) belongs to an enemy of LightningStrike_Owner) Equal to True) and (((Picked unit) is A Her and do (Actions) Loop - Actions -------- Affect the units -------- Unit - Order LightningStrike_Caster to damage (Picked unit) for ((((Real(LightningStrike_Level)) x (Real(LightningStrike_Level))) x 150.00) + 225.00) using attack type Spells and damage type Normal. Lightning - Create a lightning effect Forked Lightning LightningStrike_InitialPoint (Position of (Picked unit)) Set LightningStrike_Lightnings[LightningStrike_AddNumber] = (Last created lightning effect) Set LightningStrike_AddNumber = (LightningStrike_AddNumber + 1) Wait 0.50 seconds -------- Destroy lightnings -------- For each (Integer A) from 1 to (LightningStrike_Level + 3), do (Actions) Loop - Actions Lightning - Destroy LightningStrike_Lightnings[LightningStrikeLightningNumber] Set LightningStrikeLightningNumber = (LightningStrikeLightningNumber + 1) Lightning - Destroy LightningStrike_Initial -------- Reset variables -------- Set LightningStrikeLightningNumber = 1 Set LightningStrike_AddNumber = 1 ========================================================== Lightning Strike 9 Events Unit - A unit Starts the effect of an ability Conditions (Ability being cast) Equal to Lightning Strike (Real) Actions Set LightningStrike_Caster = (Casting unit) Set LightningStrike_Owner = (Owner of LightningStrike_Caster) Set LightningStrike_InitialPoint = (Target point of ability being cast) Wait 0.25 game-time seconds Set LightningStrike_Level = (Level of Lightning Strike (Real) for (Casting unit)) -------- Create initial lightning and store it -------- Lightning - Create a lightning effect Chain Lightning - Primary (Position of LightningStrike_Caster) LightningStrike_InitialPoint Set LightningStrike_Initial = (Last created lightning effect) -------- Create purge buff -------- Animation - Play (Last created unit)'s birth animation Unit - Create 1 Lightning Strike Dummy (Purge Buff) for Neutral Passive at LightningStrike_InitialPoint facing Default building facing degrees Unit Group - Pick every unit in (Units within (((Real(LightningStrike_Level)) x 50.00) + 200.00) of LightningStrike_InitialPoint) and do (Actions) Loop - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions ((Picked unit) is dead) Equal to True Then - Actions Unit - Remove (Picked unit) from the game Else - Actions Do nothing -------- Pick units to be affected -------- Unit Group - Pick every unit in (Random (LightningStrike_Level + 3) units from (Units within (((Real(LightningStrike_Level)) x 50.00) + 200.00) of LightningStrike_InitialPoint matching ((((Picked unit) belongs to an enemy of LightningStrike_Owner) Equal to True) and (((Picked unit) is A Her and do (Actions) Loop - Actions -------- Affect the units -------- Unit - Order LightningStrike_Caster to damage (Picked unit) for ((((Real(LightningStrike_Level)) x (Real(LightningStrike_Level))) x 150.00) + 225.00) using attack type Spells and damage type Normal. Lightning - Create a lightning effect Forked Lightning LightningStrike_InitialPoint (Position of (Picked unit)) Set LightningStrike_Lightnings[LightningStrike_AddNumber] = (Last created lightning effect) Set LightningStrike_AddNumber = (LightningStrike_AddNumber + 1) Wait 0.25 seconds -------- Destroy lightnings -------- For each (Integer A) from 1 to (LightningStrike_Level + 3), do (Actions) Loop - Actions Lightning - Destroy LightningStrike_Lightnings[LightningStrikeLightningNumber] Set LightningStrikeLightningNumber = (LightningStrikeLightningNumber + 1) Lightning - Destroy LightningStrike_Initial -------- Reset variables -------- Set LightningStrikeLightningNumber = 1 Set LightningStrike_AddNumber = 1 ========================================================== |
| 05-15-2005, 12:43 AM | #7 |
I don't see why you would have 5 triggers for this. Just a thought, take the caster system's map , get the Thor's hammer trigger, then make your spell create a caster that just casts thor's hammer on the position of the target unit. |
| 05-15-2005, 09:42 PM | #8 |
Guest | All those triggers are "induvidial" atempts to get the spell work. They are not ment to work together. They are just 5 of all my the atempts listed in the creation order so I know which ways I have already tried. About Thor's Hammer, the spell would be perfect but I cant find any maximum limit of how many targets that will be hit by the lightning bolts. The spells seems to send ligntnings to all enemies in the radius. In my spell I want to have a limit of how many units to be hit by lightnings. Another thing is that I know nearly nothing about costum scripts and JASS so I can't make the level of the "dummy spell" working the lightning bolts be the same as the heroe's spell that executes the trigger. Same thing about the radius. If you would do a special version of the spell where the spell has 10 levels and the damage, number of targets and radius increases with level, it would be perfect. Just another question, do you know why conditions that only allows living units to be affected doesn't work in 1.18? |
| 05-16-2005, 04:10 PM | #9 | |
Quote:
I don't think that is true. I would have noted that |
| 05-19-2005, 09:10 AM | #10 |
Guest | Strange becouse I noticed that when I tried making Lightning Strike. I made the trigger pick 10 enemy units. When I added a condition telling to only pick living units, the trigger didn't pick any at all. Any way, will you make the spell or not? |
