| 08-25-2006, 11:34 PM | #1 | ||
type of Spell: Channeling Info: Ideal spell as a hero's ultimate ability. The caster selects an AOE where the Kraken's Tentacles will arise, attacking the enemies in the AOE. These tentacles has the bash ability and they can be attacked by the enemy, protecting in some way the caster unit. If an enemy enters to the AOE or a tantacle is killed, a new tentacle will rise from the water, and the opposite situation happens if one enemy dies or leaves the AOE. If the spell is casted in walkable pathing, the tentacles won't appear. Because is a channeling spell, it can be stopped via stun, casting other ability or killing the caster. the spell duraton is the duration of the spell animation x number of times the unit do the spell animation. This spell should be seen as one that summon, control and remove dynamically allied units in a AOE. From version 1.1 you can change easily the summoned unit and the path type where they will be summoned. I hope you like it ;) LATEST UPDATE (25/10/2006): Now this spell has sound configuration, so you can change the sound produced by this spell.
|
| 08-26-2006, 12:06 AM | #2 |
there aren't too many maps that could an ability like this because it requires so much water, also it looks unorganized... of course the kraken's tentacles aren't organized anyways but.. |
| 08-26-2006, 12:14 AM | #3 |
aye if its only useable in water then its use is verry limited, anyways looks like a nice spell. |
| 08-26-2006, 12:30 AM | #4 |
Okay, first of all. JESP manifest requires it be present in your map. Follow this link and put that in the map in a disabled trigger somewhere. All of the functions in the spell should have some sort of unique prefix. This way you can easily change the prefix for a new spell or some such. Also, you should use 'constant function's for your configuration functions. Like -- JASS:constant function YourPrefix_SpellID takes nothing returns integer // to complies with the JESP Standard return 'A000' endfunction Also, you should combine your boolean functions. They're entirely too inefficient as is. This -- JASS:function Is_Enemy takes nothing returns boolean return ( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true ) endfunction function Is_Alive takes nothing returns boolean return ( GetWidgetLife(GetFilterUnit()) > 0.405 ) endfunction function Is_Enemy_Alive takes nothing returns boolean return GetBooleanAnd( Is_Enemy(), Is_Alive() ) endfunction JASS:function YourPrefix_Check takes nothing returns boolean return IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) and GetWidgetLife(GetFilterUnit()) > 0.405 endfunction I recommend optimizing your TentacleIsInRange function to not use the DistanceBetweenPoints() BJ. This is a function I use in AotZ, you can skip the function call and just use what it does. JASS:function DistanceBetweenPointsXY takes real x1, real y1, real x2, real y2 returns real return SquareRoot((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2)) endfunction "UnitHasBuffBJ()" can be broken down into using "GetUnitAbilityLevel(YourUnit, YourBuffRaw) > 0" "IsUnitDeadBJ()" can be broken down into "GetWidgetLife(YourUnit) < .405" Everytime you use "set TempPoint = SomeLocation" you need to RemoveLocation that location. Just removing it once after 50 declarations leaks the first 49. There are lots and lots of BJs and a bunch of location leaks you need to work out. Most of them are in the Trig_Kraken_Starts_Actions function. Also, why do you use "bj_POLLED_WAIT_INTERVAL"? I dont see any reason to use it over 0.0 or some such. (I didn't even read what it was used for, just saw it and wondered why) |
| 08-26-2006, 12:44 AM | #5 | ||
Quote:
Quote:
Edit: Thinking in that, I'll put a conditional to detect in which kind of path it should work. @ Rising_Dusk: Wow, I have a lot of thing to modify :) I'll follow your recommendations and I'll update the map ASAP. |
| 08-26-2006, 08:43 AM | #6 |
Also that image is huge. Fix please kay thanks bye. |
| 08-26-2006, 01:42 PM | #7 | |
Screenshot fixed, code upgrade in progress. Quote:
![]() |
| 08-26-2006, 01:53 PM | #8 |
Tim.'s trying to be all ninja-like. Don't mind him. :P |
| 08-26-2006, 06:19 PM | #9 |
Better, thanks. |
| 08-27-2006, 11:32 PM | #10 |
Wow now THAT is a cool water spell, good job |
| 08-28-2006, 03:34 AM | #11 |
Just to say that I've updated my spell to 1.1. Changelog 27/08/2006:
|
| 08-28-2006, 04:31 AM | #12 |
You're getting closer. :D Okay, to start it off, you're still missing your prefix in front of most of your functions. The JESP manifest says ALL functions in your spell need to use the prefix unless they're widely used (Like KaTTaNa's handle vars or SimError). So a function like Trig_Kraken_Actions you may consider renaming as just Kraken_Actions. Or your TentacleIsInRange should be Kraken_TentacleIsInRange. You picked up on the constant functions really well, you've even got them taking level parameters. Your spell code is a lot easier to read as well, you added lots of description; well done there. Most of your BJ usage is for ease of reading and the ones you use don't leak so far as I can tell. So those should be fine. Aside from that, the code looks great. Good job. :D I noticed you use a global sound variable declared in the Sound Editor, that sort of thing might be useful to add to implementation. (I noticed you didn't make mention of it in the implementation area) Just fix those small things I mentioned like the prefix, etc. and you should be good to go. |
| 08-28-2006, 03:03 PM | #13 |
so close, so close!!!! :) My godness, I forgot to change that, probably it was because I' was implementing the leveling option. I'll make that changes. About the sound, I don't know how to call the sound files via JASS, is there a way to get the sound path in order to change it?? because I was thinking in adding the option to change the sound. |
| 08-28-2006, 03:35 PM | #14 |
I go away from home for a couple of days, and this happens? Hax. I'll check it out a little later (after homework) and if it's all in order (thanks Dusk ^_^), approve. Edit: ok In this usage of DistanceBetweenPoints, you are using a comparison. You could speed it up by removing the square root (squaring both sides). So modifying Dusk's function: JASS:function IsPointInRange takes real x1, real y1, real x2, real y2, real range returns boolean return ((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2)) <= range * range endfunction I would recomend some constant functions so people can change the special effects created (currently naga building death). Also some constants to set the rawcode of abilities to add for spell immunity etc. Your 'micro tentacle AI' won't actually prevent them leaving the AoE. If it sees a unit within its aquisition range to attack, the attack move command will allow it to follow that unit even if it isn't going in the direction of the attack move command. Get rid of useless BJs. |
| 08-28-2006, 07:23 PM | #15 |
I'll do the changes as soon as I get home. Thanks blu :) About the tentacle AI, I can tell you that it really works, without that, the tentacles would spread horribly, now they are more forced to stay in the range. ATM I'm thinking in a function not so heavy that detects the nearest enemy in the range. I'm going to see if it works |
