Wc3C.net

Wc3C.net (http://www.wc3c.net/forums.php)
-   vJass Spells (http://www.wc3c.net/forumdisplay.php?f=647)
-   -   Overgrowth (http://www.wc3c.net/showthread.php?t=104647)

FriendlyPsycho 02-21-2009 10:01 AM

Overgrowth
 
4 Attachment(s)
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!

sephra 02-21-2009 01:57 PM

nice spell i like it. +rep and credits

The Grey Knight 02-21-2009 03:37 PM

hum, isnt there a similar spell in ToB vO?

Tekal 02-21-2009 03:41 PM

Looks pretty big....and laggy

FriendlyPsycho 02-21-2009 04:45 PM

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 02-22-2009 12:38 AM

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 02-22-2009 02:11 AM

Ah grand idea, thanks! I'll try to do some newb editing, hopefully it would turn out well.

Anitarf 02-22-2009 11:24 AM

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.

FriendlyPsycho 02-22-2009 11:45 AM

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.

Anitarf 02-22-2009 12:33 PM

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.

FriendlyPsycho 02-22-2009 12:41 PM

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 02-22-2009 01:41 PM

UPDATED

Now conforms to all of Anitarf's requests.

Anitarf 02-22-2009 09:06 PM

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.

FriendlyPsycho 02-23-2009 01:46 AM

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.

xombie 02-23-2009 04:22 AM

I have a suggestion, if I may?


All times are GMT. The time now is 07:54 PM.

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