HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Chain Throw and Random Slash

04-23-2006, 09:36 PM#1
wyrmlord
These are some spells I have just recently made. Credit to KaTTaNa for the local handle variables system.

Spells Included:

Chain Throw - Creates a magical chain from the hero to an enemy and swings them around in a circle damaging and knocking back both allies and enemies alike. After around 2 rotations, the chain will be released and the unit will go sliding away from the caster. Also knocks over trees.

Random Slash - The hero moves around an area at high speed, damaging any enemies hit within a small area around the hero.

Updates:
Chain Throw:
-Got rid of variables that were not needed.

-Now checks for if a terrain type is pathable (for air) before moving a unit during the swing part of the spell.

-Release angle is now fixed and is more realistic (no longer moves the target straight out from the caster, but instead at an angle).

-Enemy units knocked back other than the target will now knock over trees as well.

Update 2:
-Did minimal work to update the spells to patch 1.23b. The handle variables system used in the map has been updated to use the new hashtables and will not work in Warcraft 3 versions prior to patch 1.23b. The spells will still work in the regular World Editor and do not require the NewGen editor.
Attached Images
File type: jpgChain Throw Screenshot.jpg (84.3 KB)
File type: jpgSlash Screenshot.jpg (62.3 KB)
Attached Files
File type: w3xChain and Slash.w3x (31.1 KB)
File type: w3xChain and Slash 1-23b.w3x (31.1 KB)
04-23-2006, 10:52 PM#2
vile
Nice concept overall, the random slash looks weird.
The chain throw has a little bug, the unit was kept on moving with the timer, after he died. The body just kept on.
04-24-2006, 02:28 PM#3
Blade.dk
Very good spells, there is just one thing that I would like you to fix before approving them: You are using KaTTaNa's local handle variables functions, and even though you give credit, that can only be seen in the WE. Please add some more visible credit, for example as a text message in the map or in the loading screen.
04-24-2006, 05:45 PM#4
Game_Slave
hey, wyrmlord, nice to see your skills are progressing. very nice spells and original concepts.
rep given.
04-24-2006, 07:41 PM#5
mmx2000
Hmmm I'll have to check this out.
I was working on nearly the exact same spell as your Chain Throw, but had tons of bugs.
Your version sounds better :)
04-24-2006, 08:12 PM#6
Blade.dk
Great spells, approved :).
04-25-2006, 12:18 PM#7
BertTheJasser
The concept of chain trow is quite new. Will look at the code.

There is a bug in chain throw. The unit doesn't go straight forward when the spell finishes. The unit doesn't go straight on.

And why do you things like that
Collapse JASS:
function Chain_Throw_Release takes unit target, unit caster returns nothing
    local timer z=CreateTimer()
    local unit c=caster
    local unit e=target
This is a waste of time. You can use target and caster as well and you even don't need to nullify them. And you can use the timer in the release function aswell. You only need to restart it and flush the attached values and attach the new values. It's faster.

And a generic thing for easier reading:
Use some spaces(I suggest 4) after an if or else.

Plus
Collapse JASS:
    call SetHandleHandle(t,"targ_effect",z)
    call SetHandleHandle(t,"cast_effect",g)
You can even write them as
Collapse JASS:
    call SetHandleHandle(t,"targ_effect",AddSpecialEffectTarget(Chain_Throw_Target_Effect(),e,Chain_Throw_Target_Attach_Point()))
    call SetHandleHandle(t,"cast_effect",AddSpecialEffectTarget(Chain_Throw_Caster_Effect(),c,Chain_Throw_Caster_Attach_Point()))
By the way: I think it's easier to configure if you use AddSpellEffectTargetById(abi,fxtype,target,attachment)
04-25-2006, 08:25 PM#8
wyrmlord
I will work on the angle thing, I think I will make it also take the angle used in the swing function which should work better. And also, I will get rid of the extra variables that are not needed. Thanks for the suggestions.
03-25-2007, 06:52 PM#9
Skurai
Great spell, I wanna use it but just when i copied the first part of the script to my map, i save the map but it worldeditor crashes.Weird,this happens to the simple knockback spell map as well.
03-25-2007, 08:05 PM#10
wyrmlord
Both systems probably use some functions with the same names (perhaps the handle variables part). To fix this, try getting rid of functions with the same name. If you want to find functions with the same name, you can either find them manually and remove 1 copy or you can use a more reliable syntax checker (such as PJASS) to find copies of the same function.
03-27-2007, 03:49 AM#11
Skurai
Quote:
Originally Posted by wyrmlord
Both systems probably use some functions with the same names (perhaps the handle variables part). To fix this, try getting rid of functions with the same name. If you want to find functions with the same name, you can either find them manually and remove 1 copy or you can use a more reliable syntax checker (such as PJASS) to find copies of the same function.
So if i download this PJASS thing and run it,I can use the spell then?cause i dunno jass though i understand some of the basic commands.I think function name is just the name of the first line function 'xxx' takes nothing returns nothing. Is that wat u were referriing to?

When WE crashes, it had alot of errors when compile lol. This is a nice spell though i guess it abit 2 much for noobs like me.
03-27-2007, 07:46 PM#12
wyrmlord
You can usually ignore all errors except for the first one on Wc3's syntax checker. Yes, when I say function name I'm referring to the "function func_name takes value returns value". You'll also have to rename all calls to the function as well. (Get a text editor and use find/replace).
03-28-2007, 12:26 PM#13
Skurai
Quote:
Originally Posted by wyrmlord
You can usually ignore all errors except for the first one on Wc3's syntax checker. Yes, when I say function name I'm referring to the "function func_name takes value returns value". You'll also have to rename all calls to the function as well. (Get a text editor and use find/replace).

I c,thanks for the info