wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Resources > Code Resources > vJass Spells
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 02-21-2009, 10:01 AM   #1
FriendlyPsycho
User
 
FriendlyPsycho's Avatar
 
Join Date: Feb 2009
Posts: 109

Submissions (1)

FriendlyPsycho is on a distinguished road (12)

Default Overgrowth

Zoom (requires log in)
Overgrowth
version: 1.05

Spell Information:
  • Overgrowth
  • Summons an overgrowth of vines and roots which entangles the target enemy unit and bounces on to other enemies. Entangle lasts 4 seconds, deals damage per second and prevents movement and attacking. Overgrowth can bounce infinitely as long as there's at least one target not entangled.
    • Level 1: Deals 12 damage per second
    • Level 2: Deals 24 damage per second
    • Level 3: Deals 36 damage per second

The above libraries are included in the map, but updates to them might come in the future so be sure to update as well. They are all available at Wc3c's Resource section.


I've included the code here in this post in case that a person wants to view it immediately without WE.
Expand JASS:

Changelog


=== v1.05 ===
- Optimized code a bit
- No longer uses EventTargetLib
=== v1.04 ===
- Inlined TimedXefx
- No longer uses TimedXefx as a separate library
=== v1.03 ===
- No longer uses GroupEnumUnitsInArea
=== v1.02 ===
- Used xecast in a more efficient manner
- Optimized the code in doing so a bit
- Renamed a modified version of TimedEffects into TimedXefx to prevent failure in maps which used TimedEffects
- The issue stated above has been addressed
- Added a Duration() constant
- Recoded how you configure the effects. Should be pretty versatile now.
=== v1.01 ===
- Included documentations
- Now picks the nearest target instead of a random unit within range
- Cleaned the spell code a bit, a few optimizations
- No longer uses a dummy unit for effects
- Now requires TimedEffects (Uses an unofficial, modified version)
- Now requires xefx
- Now requires GroupGet
=== v1.00 ===
- Initial release



Please feel free to comment and report bugs. Thank you very much for your time!
Attached Images
File Type: jpg overgrowth.JPG (110.2 KB, 1191 views)
Attached Files
File Type: w3x Overgrowth 1.05.w3x (73.0 KB, 208 views)

Last edited by FriendlyPsycho : 04-07-2009 at 03:37 AM.
FriendlyPsycho is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 02-21-2009, 01:57 PM   #2
sephra
User
 
Join Date: May 2008
Posts: 14

sephra has little to show at this moment (0)

Default

nice spell i like it. +rep and credits
sephra is offline   Reply With Quote
Old 02-21-2009, 03:37 PM   #3
The Grey Knight
User
 
Join Date: May 2008
Posts: 150

The Grey Knight has little to show at this moment (1)

Default

hum, isnt there a similar spell in ToB vO?
__________________
._.
The Grey Knight is offline   Reply With Quote
Old 02-21-2009, 03:41 PM   #4
Tekal
User
 
Tekal's Avatar
 
Join Date: Jun 2008
Posts: 43

Tekal has little to show at this moment (1)

Default

Looks pretty big....and laggy
Tekal is offline   Reply With Quote
Old 02-21-2009, 04:45 PM   #5
FriendlyPsycho
User
 
FriendlyPsycho's Avatar
 
Join Date: Feb 2009
Posts: 109

Submissions (1)

FriendlyPsycho is on a distinguished road (12)

Default

You can't judge a spell by it's screenshot :P It works fast, clean and efficient.

Quote:
Originally Posted by The Grey Knight
hum, isnt there a similar spell in ToB vO?

Oh yeah I think it was called Kudzu. It used ubersplats and branches/forks to other targets, this spell only chains/bounces to other targets.
FriendlyPsycho is offline   Reply With Quote
Old 02-22-2009, 12:38 AM   #6
FriendlyPsycho
User
 
FriendlyPsycho's Avatar
 
Join Date: Feb 2009
Posts: 109

Submissions (1)

FriendlyPsycho is on a distinguished road (12)

Default

Well you got a good point there, but I can't use images since that would be totally copying Kudzu and I know it's a hassle to code, at least in my perspective.

If I could get a good roots/vine model that looks better, I'll update the aesthetics. In the meanwhile, entangling roots can suffice, to say the least.
FriendlyPsycho is offline   Reply With Quote
Old 02-22-2009, 02:11 AM   #7
FriendlyPsycho
User
 
FriendlyPsycho's Avatar
 
Join Date: Feb 2009
Posts: 109

Submissions (1)

FriendlyPsycho is on a distinguished road (12)

Default

Ah grand idea, thanks! I'll try to do some newb editing, hopefully it would turn out well.
FriendlyPsycho is offline   Reply With Quote
Old 02-22-2009, 11:24 AM   #8
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,189

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

You should note the spell requirements in the code comments as well as the post itself, and the requirements in the post should have links to resource threads. The code could also use a brief description of the spell.

The spell should pick the nearest valid unit when selecting the next target instead of a random one.

Why are you using units instead of effects for the wines?

Don't use squareRoot, compare the squares instead since that's more efficient. The "size" of the projectile should be a calibrateable constant.

d.tx and d.ty could have been local variables instead of struct members.

Instead of using globals and GetFilterUnit in the target calibration function, you should use a wrapper to pass this information to the calibration function as parameters.

It would be more efficient if you kept a static xecast in a private global variable instead of creating one every time.
__________________
Anitarf is offline   Reply With Quote
Old 02-22-2009, 11:45 AM   #9
FriendlyPsycho
User
 
FriendlyPsycho's Avatar
 
Join Date: Feb 2009
Posts: 109

Submissions (1)

FriendlyPsycho is on a distinguished road (12)

Default

1.) Okay, I'll gladly update to include the requirements in the code's comments and link to them in the first post.

2.) I designed it to look for random units, but now that you've mentioned it I believe bouncing to the nearest target would be better.

3.) I use units so that I can just apply timed life to them, and effects would be a hassle since I'd have to create an array of them and check if their lifetime is up and destroy them, etc,.

4.) ..Hm? I don't seem to follow, I haven't taken up the higher levels of math and this is only formula I know to get the distance between two coordinates. Can you rewrite it for me instead? Thanks.

5.) The size of the "projectiles" are scalable. You just need to modify it in Object Editor, it's the roots dummy unit.

6.) Okay, I shall conform.

7.) Oops, forgot to clean that up. Thanks for reminding me, I will fix it.

An update will be ready ASAP.
FriendlyPsycho is offline   Reply With Quote
Old 02-22-2009, 12:33 PM   #10
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,189

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

Quote:
Originally Posted by FriendlyPsycho
3.) I use units so that I can just apply timed life to them, and effects would be a hassle since I'd have to create an array of them and check if their lifetime is up and destroy them, etc,.
Or you could use a timed effects library. Creating units is a lot less efficient than creating effects.

Quote:
4.) ..Hm? I don't seem to follow, I haven't taken up the higher levels of math and this is only formula I know to get the distance between two coordinates. Can you rewrite it for me instead? Thanks.
This is no high level math, I'm just talking about squaring both sides of the equation to get rid of the SquareRoot call.

Quote:
5.) The size of the "projectiles" are scalable. You just need to modify it in Object Editor, it's the roots dummy unit.
I was talking about the triggered "size", the 50 distance units at which the projectile hits the target.
__________________
Anitarf is offline   Reply With Quote
Old 02-22-2009, 12:41 PM   #11
FriendlyPsycho
User
 
FriendlyPsycho's Avatar
 
Join Date: Feb 2009
Posts: 109

Submissions (1)

FriendlyPsycho is on a distinguished road (12)

Default

Quote:
Originally Posted by Anitarf
Or you could use a timed effects library. Creating units is a lot less efficient than creating effects.

Hmm, fair enough.

Quote:
Originally Posted by Anitarf
This is no high level math, I'm just talking about squaring both sides of the equation to get rid of the SquareRoot call.

Oh I must have misunderstood, now I understand. Will fix that right away!

Quote:
Originally Posted by Anitarf
I was talking about the triggered "size", the 50 distance units at which the projectile hits the target.

Ah yes yes yes the hard-coded collision size, I'll get to that too.
FriendlyPsycho is offline   Reply With Quote
Old 02-22-2009, 01:41 PM   #12
FriendlyPsycho
User
 
FriendlyPsycho's Avatar
 
Join Date: Feb 2009
Posts: 109

Submissions (1)

FriendlyPsycho is on a distinguished road (12)

Default

UPDATED

Now conforms to all of Anitarf's requests.
FriendlyPsycho is offline   Reply With Quote
Old 02-22-2009, 09:06 PM   #13
Anitarf
Procrastination Incarnate


Development Director
 
Join Date: Feb 2004
Posts: 8,189

Submissions (19)

Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)Anitarf has a brilliant future (903)

2008 Spell olympics - Fire - SilverApproved Map: Old School Alliance TacticsHero Contest #2 - 3rd PlaceSpell making session 2 winner

Default

Quote:
Originally Posted by Litany
Effects can only be displayed at their default orientation. He should keep units and randomize their facing.
That's a good point. This justifies using units.

In this case, since you're already using xecast, you should use xefx for the effects; that way, you can get random orientations for your effects while not needing an extra custom unit.
__________________
Anitarf is offline   Reply With Quote
Old 02-23-2009, 01:46 AM   #14
FriendlyPsycho
User
 
FriendlyPsycho's Avatar
 
Join Date: Feb 2009
Posts: 109

Submissions (1)

FriendlyPsycho is on a distinguished road (12)

Default

Oh but I am using xefx ;) I also used it in conjunction with TimedEffects, but I modified TimedEffects to use xefx instead of effects directly.
FriendlyPsycho is offline   Reply With Quote
Old 02-23-2009, 04:22 AM   #15
xombie
Banned
 
Join Date: Oct 2006
Posts: 858

xombie has a spectacular aura about (79)xombie has a spectacular aura about (79)xombie has a spectacular aura about (79)

Default

I have a suggestion, if I may?
xombie is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


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


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2019, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services