Spell Death Wrap

S

skeloman

Guest
my first spell i ever made, so dont expect wonders, or dota quality, or wondrous dota quality, but still dont be discouraged by the fact! i think this spell is awesome, hence why i made it!

Stuns the target and summons 4 skulls that rotate around the hero then fly towards the target, dealing 50 damage each on contact. this can all be changed rather easily, you can also add special effects to it to make it look cooler if you want, i dont care. You dont even have to give me credit, but it would be nice :D. If you do decide to tinker around with it, i dont suggest getting rid of the stun, it makes it so the skulls miss and dont dissapear...

screenie:
screeny1.jpg


Edit: SFX leaks fixed, the point leaks made the game crash when i ran it after i tried to fix it, dont know what i did wrong.

new file attached
 

Attachments

  • Death Wrap.w3x
    24.4 KB · Views: 264

H34DhUnT3r

Ultra Cool Member
Reaction score
36
Code:
Death Wrap
    Events
        Unit - A unit Begins casting an ability
    Conditions
        (Ability being cast) Equal to Death Wrap (Neutral Hostile)
    Actions
        Set deathpos = (Position of (Triggering unit))
        Set deathdis = 100.00
        Set deathtarpos = (Position of (Target unit of ability being cast))
        Set deathtar = (Target unit of ability being cast)
        Trigger - Add to Death Wrap 2 <gen> the event (Unit - A unit comes within 100.00 of deathtar)
        Unit - Create 1 Death Skull (Level 1) for Neutral Passive at (deathpos offset by (0.00, 400.00)) facing Default building facing degrees
        Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
        Set skull1 = (Last created unit)
        Unit - Create 1 Death Skull (Level 1) for Neutral Passive at (deathpos offset by (400.00, 0.00)) facing Default building facing degrees
        Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
        Set skull2 = (Last created unit)
        Unit - Create 1 Death Skull (Level 1) for Neutral Passive at (deathpos offset by (0.00, -400.00)) facing Default building facing degrees
        Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
        Set skull3 = (Last created unit)
        Unit - Create 1 Death Skull (Level 1) for Neutral Passive at (deathpos offset by (-400.00, 0.00)) facing Default building facing degrees
        Special Effect - Create a special effect at (Position of (Last created unit)) using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
        Set skull4 = (Last created unit)
        Set death1 = (Position of skull1)
        Set death2 = (Position of skull2)
        Set death3 = (Position of skull3)
        Set death4 = (Position of skull4)
        Wait 1.00 seconds
        Unit - Order skull1 to Move To death2
        Unit - Order skull2 to Move To death3
        Unit - Order skull3 to Move To death4
        Unit - Order skull4 to Move To deathtarpos
        Wait 0.80 seconds
        Unit - Order skull1 to Move To death3
        Unit - Order skull2 to Move To death4
        Unit - Order skull3 to Move To deathtarpos
        Wait 0.80 seconds
        Unit - Order skull1 to Move To death4
        Unit - Order skull2 to Move To deathtarpos
        Wait 0.80 seconds
        Unit - Order skull1 to Move To deathtarpos
It has a lot of leaks you need to destroy all the special effects and points
special effects with:
Code:
Special Effect - Destroy (Last created special effect)
and points with:
Custom script: call RemoveLocation(udg_*PointVar*)
and then just put all the point variables instead of *PointVar*
so you get about 6 or 7 i think..

spell looks kinda coowl (for your first spell that is:p)

Greetings,
H34DhUnT3r[NL]
 
S

skeloman

Guest
hey thanks for the feed back, and as i said, this is just the base spell, no special junk.. *well. SOME special junk* itll look cooler if people want to make it look cooler, *aka im lazy* and ill try and fix those leaks.
 

Tinki3

Special Member
Reaction score
418
The following goes in the order of your trigger's functions:

First off, change your event from "Begins Casting", to "Starts the effect of".
'Begins' makes it almost always possible to quickly cancel the spell, and then
re-cast it over & over, without using mana or starting cooldown, but you still
get the effect from the trigger! 'Starts the effect' runs the trigger after mana
and cooldown have started, which is more efficient, and, obviously, less rigged.

"deathpos" and "deathtarpos" both aren't removed after use. I'll explain more
clearly how to do this soon enough.

"Trigger - Add to Death Wrap 2 <gen> the event (Unit - A unit comes within 100.00 of deathtar)". I don't really have a problem with multiple events been
added to one trigger. But, it can cause double-firing of the added-to-trigger.
Fine IMO though, and should be fine.

You create the "skull" units for Neutral Passive, and at a leaky point. Since
in the trigger "Death Wrap 2", you use (Triggering unit) to damage the "deathtar" unit, NP will be damaging them for you, flushing the benefit of
bounty and possibly exp for the caster of the spell. Create the units for,
Owner of (Triggering unit). That'll take care of any player that uses the spell.

And speaking of that leaky point, you're using (somepoint Offset by 0.00, 400.00).
You need to store that offset data into a point variable to prevent that leak:
Code:
Set Temp_Point = (Death_Pos offset by (0.00, 400.00))
Unit - Create 1 Death Skull (Level 1) for (Owner of (Triggering unit)) at [U]Temp_Point[/U] facing Default building facing degrees
Set [U]Death_Skull[1][/U] = (Last created unit)
Special Effect - Create a special effect at [U]Temp_Point[/U] using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
Special Effect - Destroy (Last created special effect)
Custom script:    call RemoveLocation(udg_Temp_Point)
Underlined text:

Create 1 Death Skull ... at Temp_Point -> We create the skull at "Temp_Point" to prevent that point leak.

Set Death_Skull[1] = (Last created unit) -> You don't need 4 seperate variables for 4 units.
Delete 3 of them, and change the remaining one's array size to 1. That way, you can use 1 variable
the same way as 4 :)

Create a special effect at Temp_Point -> Changed from "Create effect at (Position of(someunit))", preventing another point leak.

And as you can see, I removed Temp_Point with the custom script action
directly after we've finished using it.

You need to repeat the above method for each unit that is created.

Here is the updated code for the first trigger (I cleaned the var names a little):
Code:
Death Wrap
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Death Wrap (Neutral Hostile)
    Actions
        Set Death_Detection_Dist = 100.00
        Set Death_Pos = (Position of (Triggering unit))
        Set Death_Targ_Pos = (Position of (Target unit of ability being cast))
        Set Death_Targ = (Target unit of ability being cast)
        Trigger - Add to Death Wrap 2 <gen> the event (Unit - A unit comes within Death_Detection_Dist of Death_Targ)
        -------- --------------------------------------- --------
        Set Temp_Point = (Death_Pos offset by (0.00, 400.00))
        Unit - Create 1 Death Skull (Level 1) for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
        Set Death_Skull[1] = (Last created unit)
        Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
        Special Effect - Destroy (Last created special effect)
        Custom script:   call RemoveLocation(udg_Temp_Point)
        -------- --------------------------------------- --------
        Set Temp_Point = (Death_Pos offset by (400.00, 0.00))
        Unit - Create 1 Death Skull (Level 1) for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
        Set Death_Skull[2] = (Last created unit)
        Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
        Special Effect - Destroy (Last created special effect)
        Custom script:   call RemoveLocation(udg_Temp_Point)
        -------- --------------------------------------- --------
        Set Temp_Point = (Death_Pos offset by (0.00, -400.00))
        Unit - Create 1 Death Skull (Level 1) for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
        Set Death_Skull[3] = (Last created unit)
        Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
        Special Effect - Destroy (Last created special effect)
        Custom script:   call RemoveLocation(udg_Temp_Point)
        -------- --------------------------------------- --------
        Set Temp_Point = (Death_Pos offset by (-400.00, 0.00))
        Unit - Create 1 Death Skull (Level 1) for (Owner of (Triggering unit)) at Temp_Point facing Default building facing degrees
        Set Death_Skull[4] = (Last created unit)
        Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
        Special Effect - Destroy (Last created special effect)
        Custom script:   call RemoveLocation(udg_Temp_Point)
        -------- --------------------------------------- --------
        For each (Integer A) from 1 to 4, do (Set Death_Skull_Pos[(Integer A)] = (Position of Death_Skull[(Integer A)]))
        Wait 1.00 seconds
        For each (Integer A) from 1 to 3, do (Unit - Order Death_Skull[(Integer A)] to Move To Death_Skull_Pos[((Integer A) + 1)])
        Unit - Order Death_Skull[4] to Move To Death_Targ_Pos
        Wait 0.80 seconds
        For each (Integer A) from 1 to 2, do (Unit - Order Death_Skull[(Integer A)] to Move To Death_Skull_Pos[((Integer A) + 2)])
        Unit - Order Death_Skull[3] to Move To Death_Targ_Pos
        Wait 0.80 seconds
        Unit - Order Death_Skull[1] to Move To Death_Skull_Pos[4]
        Unit - Order Death_Skull[2] to Move To Death_Targ_Pos
        Wait 0.80 seconds
        Unit - Order Death_Skull[1] to Move To Death_Targ_Pos
        Custom script:   call RemoveLocation(udg_Death_Pos)
        Custom script:   call RemoveLocation(udg_Death_Targ_Pos)
        For each (Integer A) from 1 to 4, do (Custom script:   call RemoveLocation(udg_Death_Skull_Pos[GetForLoopIndexA()]))
As you can see, alot of lines are saved with the (Integer A) and var array use.

Your trigger will need to be leakless, and look something like mine if you want your spell to be approved.

Also, the skulls might not reach the target unit to kill them (targ could run away), which means that
the skulls would never die because they havn't come within 100.00 of the targ.

To fix this, you should add an expiration timer to each skull, and simply order them to attack-move-to
targ. That way you'll know that the skulls will ultimately die.
 
S

skeloman

Guest
ok a) i have no idea what half of that says, ill continue working to try and understand it... b) the enemy is stunned, to it cant run away, < thats really the only thing i understand from your message, i kno this is prolly rude or extremely lazy, but can you help me do those things, cause i really dont understand them...

edit: ok, i did all the anti leak things and stuff you said to, so my trigger now looks exactly like yours, except for the interger A stuff, that is the one thing i really dont understand about WE other then jass, it is the one gui command i dont understand, but im workin on it. even without the line saving, would you say its approvable?
 

Tinki3

Special Member
Reaction score
418
>the enemy is stunned, so it cant run away

Didn't catch that part :p

>can you help me do those things, cause i really dont understand them

If you can't do any of it, I suggest you read some tutorials on variables & mem. leaks.

If it's really that extreme, I'll give you the leakless map.

>except for the interger A stuff, that is the one thing i really dont understand

Tutorial link.

>even without the line saving, would you say its approvable?

Of course, yes.
Line saving is just a bit more efficient.

Could I take a look at the updated code?
 
S

skeloman

Guest
well, when i was removing the points it disabled my trigger sayin sumthin about not finding a name... so that undoes my fixing stuff.... phooey
 

Tinki3

Special Member
Reaction score
418
>it disabled my trigger sayin sumthin about not finding a name

You most likely entered the wrong variable name.
When referring to a global variable in JASS, you must put a "udg_" text in front of it.

For example:
Custom script: call DestroyGroup(udg_My_Group)

JASS is case-sensitive, so you have to be careful when using Custom scipts.
 
S

skeloman

Guest
as i said earlier, i kno nothing about jass, so ill keep workin on it.

well, im done! here it is, and ignore the satan circle triggers, that is a side project.
 

Attachments

  • Death Wrap.w3x
    23.3 KB · Views: 241

Tinki3

Special Member
Reaction score
418
Code:
Trigger - Add to Death Wrap 2 <gen> the event (Unit - A unit comes within [B]100.00[/B] of deathtar)
Replace 100.00 with "deathdis".
That is why it's there, is it not?

Code:
Unit - Create 1 Death Skull (Level 1) for [B]Player 1 (Red)[/B] at temppoint facing Default building facing degrees
Replace "Player 1 (Red)" with "(Owner of (Triggering unit))".
What if Player Blue, or Purple want to use the spell?
'Owner of Trig. unit' takes care of all that.

Code:
Special Effect - Create a special effect at [B](Position of (Last created unit))[/B] using Abilities\Spells\Undead\DeathCoil\DeathCoilSpecialArt.mdl
Replace "(Position of (Last created unit))" with "temppoint".
It's the same location, and prevents a leak.
Why not use it?

You also hadn't cleaned/removed "deathpos", "deathtarpos", "death1", "death2", "death3" or "death4".

Simply add these lines directly below the last action of your trigger:
Code:
[COLOR="Green"]//Last action here[/COLOR]
Custom script:   call RemoveLocation(udg_deathpos)
Custom script:   call RemoveLocation(udg_deathtarpos)
Custom script:   call RemoveLocation(udg_death1)
Custom script:   call RemoveLocation(udg_death2)
Custom script:   call RemoveLocation(udg_death3)
Custom script:   call RemoveLocation(udg_death4)
 
S

skeloman

Guest
deathdis does nothing, that was replaced with temppoint, and ill do those other custom scripts tommorrow, i gotta get up early tomorrow and im headin to bed now...
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
looks nice but update the newest map to the first post :D
Edit: forgot +rep :p
 
S

skeloman

Guest
ummm err, the shadows are sposed to be there? lol ill get rid of em, and ignore the satan circle triggers, thats part of a different spell im workin on, im gonna try and make it a spell pack. this one was released just so i could learn to spot leaks and stuff... so expect more necro goodness soon!

so long for now, and thanks for all the rep!
 

Tinki3

Special Member
Reaction score
418
>this one was released just so i could learn to spot leaks and stuff

...
I suggest you just fix this spell, so I can approve it,
and you can then start another fresh thread with your other spell.

No point adding another spell that needs to be fixed too IMO.
1 at a time, especially if you're new to spell-making.
 

emjlr3

Change can be a good thing
Reaction score
395
graveyarded until an update
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top