[Log in / Register]
| News | Chat | Pastebin | Donations | Tutorials | Rules | Forums |
| Maps | Skins | Icons | Models | Spells | Tools | Jass | Packs | Hosted Projects | Starcraft II Modding | Starcraft II Resources | Galaxy Wiki |
(Keeps Hive Alive)
Go Back   The Hive Workshop > Spells


Reply
 
Thread Tools
The Hive Workshop Spells:
Lightning Storm v1.1
Images
Highslide JS
Details
Uploaded:06:47, 1st Aug 2012
Last Updated:11:17, 2nd Aug 2012
Keywords:Lightning Storm, Lightning, Storm
Type:No Target
Category:GUI / Triggers

Jazztastic Presents
Lightning Storm
Screenshots

Triggers
Hashtable
Events
Map initialization
Conditions
Actions
Hashtable - Create a hashtable
Set hashtable = (Last created hashtable)
-------- To change the duration edit the value in the Object Editor named "Follow Through Time" --------
-------- If TRUE, will burn mana equal to the damage --------
Set manaburn = True
-------- Sets the damage done per bolt --------
Set damage[1] = 35.00
Set damage[2] = 55.00
Set damage[3] = 75.00
-------- The pick range for the random unit --------
Set areaofeffect[1] = 1200.00
Set areaofeffect[2] = 1400.00
Set areaofeffect[3] = 1600.00
-------- Ground SFX --------
Set unitsfx = Abilities\Weapons\Bolt\BoltImpact.mdl
-------- The Order ID. This must correspond with the ability ID in the base ability --------
Set orderid = channel
Lightning Storm Cast
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Lightning Storm
Actions
-------- Simply primes the loop --------
Unit Group - Add (Triggering unit) to stormgroup
Trigger - Turn on Lightning Storm Loop <gen>
Lightning Storm Loop
Events
Time - Every 0.10 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in stormgroup and do (Actions)
Loop - Actions
Set caster = (Picked unit)
Custom script: set udg_handle = GetHandleId(udg_caster)
-------- We destroy the lightning here because we want it gone regardless of whether the unit is channeling or not --------
-------- If we only destroyed it if it was channeling, a lightning would be left at the end --------
Set boolean = (Load 1 of handle from hashtable)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
boolean Equal to True
Then - Actions
Hashtable - Save False as 1 of handle in hashtable
Lightning - Destroy (Load 0 of handle in hashtable)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Current order of caster) Equal to (Order(orderid))
(Life of caster) Greater than 0.00
Then - Actions
-------- It only strikes every other instance. --------
-------- This way there is a visible strike each time, not just it jumping from one spot to another --------
-------- Setting stuff --------
Set point1 = (Position of caster)
Set level = (Level of Lightning Storm for caster)
Custom script: set bj_wantDestroyGroup = true
Set target = (Random unit from (Units within areaofeffect[level] of point1 matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to
-------- Simply checks if there is a unit within AoE --------
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
target Equal to No unit
Then - Actions
Else - Actions
Set point2 = (Position of target)
-------- Sets the lightning, and sets the sfx --------
Custom script: set udg_light = AddLightningEx("FORK", true, GetUnitX(udg_caster), GetUnitY(udg_caster), GetLocationZ(udg_point1) + 1400, GetUnitX(udg_target), GetUnitY(udg_target), GetLocationZ(udg_point2) + GetUnitFlyHeight(udg_target))
Special Effect - Create a special effect attached to the origin of target using unitsfx
Special Effect - Destroy (Last created special effect)
-------- Damage + manaburn --------
Unit - Cause caster to damage target, dealing damage[level] damage of attack type Spells and damage type Normal
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
manaburn Equal to True
Then - Actions
Unit - Set mana of target to ((Mana of target) - damage[level])
Else - Actions
Hashtable - Save Handle Oflight as 0 of handle in hashtable
Hashtable - Save True as 1 of handle in hashtable
Custom script: call RemoveLocation(udg_point2)
Else - Actions
Hashtable - Clear all child hashtables of child handle in hashtable
Unit Group - Remove caster from stormgroup
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in stormgroup) Equal to 0
Then - Actions
Trigger - Turn off (This trigger)
Else - Actions
Hashtable - Save True as 1 of handle in hashtable
Custom script: call RemoveLocation(udg_point1)
Authors Notes
This is the first channeling spell I've ever made. I looked at a spell by dark_g4andalf for how to trigger channeling,
so I guess a shout-out goes to him. It's hard to capture this spell with a screenshot so you should really look at it in-game.
If you use this credits go to Jazztastic.
Rating - 4.00 (1 vote)
(Hover and click)
Moderator Comments
Useful
09:06, 2nd Aug 2012
Magtheridon96: Approved. You didn't really need that extra complexity with the booleans, but it's totally fine in my book.
Good job.
The configuration is decent too.

This spell is approved and works properly.


Download THW Legendary Fight Jazz VS Beta.w3x
(65.9 KB, 410 Downloads)

Old 08-01-2012, 06:49 AM   #2 (permalink)
Registered User Jazztastic
Buddy
 
Jazztastic's Avatar
 
Join Date: Apr 2011
Posts: 955
Jazztastic is just really nice (305)Jazztastic is just really nice (305)
My first submission to the Legendary Fight.

I believe it is customizable enough, and it works. Comment with any suggestions/bugs you find, and I'll be sure to address them.
Jazztastic is offline   Reply With Quote
Old 08-01-2012, 11:26 AM   #3 (permalink)
Forum Moderator Magtheridon96
JESUS MAN
 
Magtheridon96's Avatar
Resource Moderator
 
Join Date: Dec 2008
Posts: 5,700
Magtheridon96 has a brilliant future (1812)
Merit Badge - Level 0: This user has proven to be extremely valuable to the Warcraft III Modding Community. 
The target variable thingamajig leaks D:
__________________
Magtheridon96 is offline   Reply With Quote
Old 08-01-2012, 12:48 PM   #4 (permalink)
Registered User Kingz
I don't care.
 
Kingz's Avatar
 
Join Date: Jun 2008
Posts: 2,769
Kingz is a splendid one to behold (817)Kingz is a splendid one to behold (817)Kingz is a splendid one to behold (817)Kingz is a splendid one to behold (817)
Techtree Contest #6 - Winner: Demon Race: Kingz has managed to create a WarCraft3 race without importing additional material, yet presenting something unique to the public! A race made by Kingz. 
This could be further optimized by removing the use of locations altogether.

For example, declare locals:
Custom script: local real x
Custom script: local real y
Custom script: local real tx
Custom script: local real ty

Then in loop:
Custom script: set x = GetUnitX(udg_caster)
Custom script set y = GetUnitY(udg_caster)
Custom script: set tx = GetUnitX(udg_target)
Custom script set ty = GetUnitY(udg_target)
Then use those coordinates how you see fit.

Edit:

(Units within areaofeffect[level] of point1 matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to
I am pretty sure this leaks a group also.
__________________
Apheraz Lucent and -Grendel will forever live in my memory, two extraordinary persons taken away from our world before their time.

And so i dedicate my signature to them, a small sign of memory that will forever remain on my profile, for as long as it exists.
I am sad it's all i can do for them now and i hope i never did something to bring them anything but joy in their life.
World is a cruel place, but it was a better place with both of you in it. Miss you both.
Kingz is offline   Reply With Quote
Old 08-01-2012, 05:28 PM   #5 (permalink)
Registered User Jazztastic
Buddy
 
Jazztastic's Avatar
 
Join Date: Apr 2011
Posts: 955
Jazztastic is just really nice (305)Jazztastic is just really nice (305)
Updated. Fixed the leak from the unit group and optimized it by using GetUnitX/Y rather than the location (although I still had to have them for the Z). I also included Kingz recommendation for special effects.

EDIT: I changed the order of the loop. This way, it'll only check if it is channeling every other cycle (only when it's being created). It will be more efficient and work better. It will also make sure the loop doesnt stop before the last lightning is destroyed, and it wont destroy a lightning before it's created. I also added in the Order ID as a string for the user to change. Finally, I fixed the triggering unit in the cast trigger. This should be ready for approval unless I incorrectly changed the loop.

Last edited by Jazztastic; 08-02-2012 at 07:29 AM.
Jazztastic is offline   Reply With Quote
Old 08-02-2012, 07:55 AM   #6 (permalink)
Registered User SpectreD
3D Modeling
 
SpectreD's Avatar
 
Join Date: Apr 2011
Posts: 546
SpectreD has disabled reputation
Seems nice :) well done
SpectreD is offline   Reply With Quote
Old 08-02-2012, 05:13 PM   #7 (permalink)
Registered User Erkki2
User
 
Join Date: Jun 2007
Posts: 163
Erkki2 has little to show at this moment (58)
Creative use of lightning effects, it looks very realistic. +rep
Erkki2 is offline   Reply With Quote
Old 08-02-2012, 10:12 PM   #8 (permalink)
Registered User Marcos DAB
Wronged
 
Marcos DAB's Avatar
 
Join Date: Mar 2011
Posts: 1,201
Marcos DAB has disabled reputation
Should use damage detection to destroy real value of mana based in target's armor.
Marcos DAB is offline   Reply With Quote
Old 08-09-2012, 04:54 AM   #9 (permalink)
Registered User .OmG.
Hive - my life
 
.OmG.'s Avatar
 
Join Date: May 2010
Posts: 197
.OmG. has little to show at this moment (8)
Quote:
Originally Posted by Marcos DAB View Post
Should use damage detection to destroy real value of mana based in target's armor.
I agree, so hero will take less damage then mana burn. Or just Improve description ;)
.OmG. is offline   Reply With Quote
Old 08-09-2012, 07:41 AM   #10 (permalink)
Registered User Kingz
I don't care.
 
Kingz's Avatar
 
Join Date: Jun 2008
Posts: 2,769
Kingz is a splendid one to behold (817)Kingz is a splendid one to behold (817)Kingz is a splendid one to behold (817)Kingz is a splendid one to behold (817)
Techtree Contest #6 - Winner: Demon Race: Kingz has managed to create a WarCraft3 race without importing additional material, yet presenting something unique to the public! A race made by Kingz. 
Or you know...
Jass:
if GetUnitState(u, UNIT_STATE_MANA) < Damage then
 call UnitDamageTarget(caster, u, GetUnitState(u, UNIT_STATE_MANA), ...)
 call SetUnitState(u, UNIT_STATE_MANA, 0)
else
 call UnitDamageTarget(caster, u, Damage, ...)
 call SetUnitState(u, UNIT_STATE_MANA, GetUnitState(u, UNIT_STATE_MANA) - Damage)
endif

A simple if/then/else statement could do it also.
I know it's in jass but i can't remember the statements in GUI.
__________________
Apheraz Lucent and -Grendel will forever live in my memory, two extraordinary persons taken away from our world before their time.

And so i dedicate my signature to them, a small sign of memory that will forever remain on my profile, for as long as it exists.
I am sad it's all i can do for them now and i hope i never did something to bring them anything but joy in their life.
World is a cruel place, but it was a better place with both of you in it. Miss you both.
Kingz is offline   Reply With Quote
Old 08-10-2012, 05:47 AM   #11 (permalink)
Registered User Jazztastic
Buddy
 
Jazztastic's Avatar
 
Join Date: Apr 2011
Posts: 955
Jazztastic is just really nice (305)Jazztastic is just really nice (305)
Or simply make the damage chaos and universal so it deals exact.
Jazztastic is offline   Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 10:08 PM.





Powered by vBulletin
Copyright 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.5.1 PL2
Copyright © Ralle