• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

Pentagram

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Pentagram:
The Hunter moves instantaneously from one place to another in a star pattern, Dealing 25 damage and slows enemies by 70% for 5 seconds each strike.

Level 1 - 3 Stars
Level 2 - 4 Stars
Level 3 - 5 Stars

This spell was inspired by the Pentagram skill of Adol from YS series :)

How to Import:
1. Make sure you enabled the "Automatically create unknown variables when pasting trigger data" Found in "File -> Preferences -> General".
2. Copy the Abilities "Pentagram" and "Dummy Slow" to your map.
3. Copy the Dummy Unit to your map.
4. Copy the Unit Indexer trigger, The Pentagram triggers to your map.
5. Enjoy!

Creditssss:
To Bribe for his MUI Spell template, this is my FIRST MUI spell it's because of him! Thanks Bribe!

Bribe again for his Unit Indexer, required to use the spell.

Triggers

  • Pentagram Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Pentagram
    • Actions
      • -------- --------
      • -------- Configuration --------
      • -------- --------
      • Unit - Make (Triggering unit) Invulnerable
      • Set PG_Caster = (Triggering unit)
      • -------- Changes the Special Effect used in each edges --------
      • Set PG_SpecialEffect = Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
      • Set ID = (Custom value of PG_Caster)
      • Set PGCasterPosition[ID] = (Position of PG_Caster)
      • -------- Tells the damage done every strike --------
      • Set PG_Damage[ID] = 25.00
      • -------- Radius affected each strike --------
      • Set PentaEdgeRadius[ID] = 400.00
      • -------- Position of caster --------
      • Set PGCaster_Position = (Position of PG_Caster)
      • -------- Special Effect used for the trail, feel free to change --------
      • Special Effect - Create a special effect attached to the chest of PG_Caster using Abilities\Weapons\IllidanMissile\IllidanMissile.mdl
      • Set PGCaster_Effect[ID] = (Last created special effect)
      • -------- Creates the points for a star --------
      • Set PentaEdge1[ID] = (PGCasterPosition[ID] offset by 256.00 towards (90.00 + (72.00 x 1.00)) degrees)
      • Set PentaEdge2[ID] = (PGCasterPosition[ID] offset by 256.00 towards (90.00 + (72.00 x 2.00)) degrees)
      • Set PentaEdge3[ID] = (PGCasterPosition[ID] offset by 256.00 towards (90.00 + (72.00 x 3.00)) degrees)
      • Set PentaEdge4[ID] = (PGCasterPosition[ID] offset by 256.00 towards (90.00 + (72.00 x 4.00)) degrees)
      • Set PentaEdge5[ID] = (PGCasterPosition[ID] offset by 256.00 towards (90.00 + (72.00 x 5.00)) degrees)
      • -------- How many stars it will create NOTE: 1 is an incomplete star --------
      • Set PG_NoOfStars[ID] = ((Level of Pentagram for (Triggering unit)) + 2)
      • -------- DON'T EDIT THIS ONE, This tells the creation of a star --------
      • Set StarCreation[ID] = 5.00
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (PGCaster_Group is empty) Equal to True
        • Then - Actions
          • Trigger - Turn on Pentagram Loop <gen>
        • Else - Actions
      • Unit Group - Add PG_Caster to PGCaster_Group


  • Pentagram Loop
    • Events
      • Time - Every 0.07 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in PGCaster_Group and do (Actions)
        • Loop - Actions
          • Set PG_Caster = (Picked unit)
          • Set ID = (Custom value of PG_Caster)
          • Set PG_Player = (Owner of PG_Caster)
          • Set PGCaster_CurrentPosition = (Position of PG_Caster)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • PG_NoOfStars[ID] Greater than 0
            • Then - Actions
              • Special Effect - Create a special effect at PGCaster_CurrentPosition using PG_SpecialEffect
              • Special Effect - Destroy (Last created special effect)
              • Custom script: set bj_wantDestroyGroup = true
              • Unit Group - Pick every unit in (Units within PentaEdgeRadius[ID] of PGCaster_CurrentPosition) and do (Actions)
                • Loop - Actions
                  • Set PG_TargetUnit = (Picked unit)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (PG_TargetUnit belongs to an enemy of PG_Player) Equal to True
                    • Then - Actions
                      • Unit - Create 1 Dummy (Vexorian, Anitarf, Infrane) for PG_Player at PGCaster_Position facing Default building facing degrees
                      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                      • Unit - Add Dummy Slow to (Last created unit)
                      • Unit - Order (Last created unit) to Human Sorceress - Slow PG_TargetUnit
                      • Unit - Cause PG_Caster to damage PG_TargetUnit, dealing PG_Damage[ID] damage of attack type Spells and damage type Unknown
                    • Else - Actions
              • Custom script: set bj_wantDestroyGroup = true
              • Unit Group - Pick every unit in (Units within PentaEdgeRadius[ID] of PGCaster_Position) and do (Actions)
                • Loop - Actions
                  • Set PG_TargetUnit = (Picked unit)
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (PG_TargetUnit belongs to an enemy of PG_Player) Equal to True
                    • Then - Actions
                      • Unit - Create 1 Dummy (Vexorian, Anitarf, Infrane) for PG_Player at PGCaster_Position facing Default building facing degrees
                      • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                      • Unit - Add Dummy Slow to (Last created unit)
                      • Unit - Order (Last created unit) to Human Sorceress - Slow PG_TargetUnit
                      • Unit - Cause PG_Caster to damage PG_TargetUnit, dealing PG_Damage[ID] damage of attack type Spells and damage type Unknown
                    • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • StarCreation[ID] Equal to 5.00
                • Then - Actions
                  • Animation - Play PG_Caster's attack animation
                  • Unit - Move PG_Caster instantly to PentaEdge4[ID], facing PentaEdge4[ID]
                  • Set StarCreation[ID] = 4.00
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • StarCreation[ID] Equal to 4.00
                    • Then - Actions
                      • Special Effect - Create a special effect at PentaEdge1[ID] using PG_SpecialEffect
                      • Special Effect - Destroy (Last created special effect)
                      • Animation - Play PG_Caster's attack animation
                      • Unit - Move PG_Caster instantly to PentaEdge1[ID], facing PentaEdge3[ID]
                      • Set StarCreation[ID] = 3.00
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • StarCreation[ID] Equal to 3.00
                        • Then - Actions
                          • Special Effect - Create a special effect at PentaEdge3[ID] using PG_SpecialEffect
                          • Special Effect - Destroy (Last created special effect)
                          • Animation - Play PG_Caster's attack animation
                          • Unit - Move PG_Caster instantly to PentaEdge3[ID], facing PentaEdge5[ID]
                          • Set StarCreation[ID] = 2.00
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • StarCreation[ID] Equal to 2.00
                            • Then - Actions
                              • Special Effect - Create a special effect at PentaEdge5[ID] using PG_SpecialEffect
                              • Special Effect - Destroy (Last created special effect)
                              • Animation - Play PG_Caster's attack animation
                              • Unit - Move PG_Caster instantly to PentaEdge5[ID], facing PentaEdge2[ID]
                              • Set StarCreation[ID] = 1.00
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • StarCreation[ID] Equal to 1.00
                                • Then - Actions
                                  • Special Effect - Create a special effect at PentaEdge2[ID] using PG_SpecialEffect
                                  • Special Effect - Destroy (Last created special effect)
                                  • Animation - Play PG_Caster's attack animation
                                  • Unit - Move PG_Caster instantly to PentaEdge2[ID], facing PentaEdge4[ID]
                                  • Set StarCreation[ID] = 0.00
                                  • Set PG_NoOfStars[ID] = (PG_NoOfStars[ID] - 1)
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • PG_NoOfStars[ID] Greater than 0
                                    • Then - Actions
                                      • Set StarCreation[ID] = 5.00
                                    • Else - Actions
                                      • Unit - Move PG_Caster instantly to PGCasterPosition[ID], facing PGCaster_Position
                                • Else - Actions
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • PG_NoOfStars[ID] Equal to 0
                • Then - Actions
                  • Special Effect - Destroy PGCaster_Effect[ID]
                  • Unit - Make PG_Caster Vulnerable
                  • Unit - Unpause PG_Caster
                  • Unit Group - Remove PG_Caster from PGCaster_Group
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (PGCaster_Group is empty) Equal to True
                    • Then - Actions
                      • Custom script: call RemoveLocation(udg_PGCaster_Position)
                      • Custom script: call RemoveLocation(udg_PentaEdge1[udg_ID])
                      • Custom script: call RemoveLocation(udg_PentaEdge2[udg_ID])
                      • Custom script: call RemoveLocation(udg_PentaEdge3[udg_ID])
                      • Custom script: call RemoveLocation(udg_PentaEdge4[udg_ID])
                      • Custom script: call RemoveLocation(udg_PentaEdge5[udg_ID])
                      • Trigger - Turn off Pentagram Loop <gen>
                    • Else - Actions
                • Else - Actions
Changelog


Uploaded the spell


Trigger Optimization


Fixed the spell being not MUI



Feel free to give suggestions, comments, report any bugs!

Keywords:
Star, Pentagram, Adol, YS Seven, Star Wars,
Contents

Pentagram (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. 13:12, 11th Feb 2014 BPower: You have location leaks You lack user configuration Using a giant ForGroup loop is past any efficiency. Using loops within the periodic trigger would...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.

13:12, 11th Feb 2014
BPower:
You have location leaks
You lack user configuration
Using a giant ForGroup loop is past any efficiency.
Using loops within the periodic trigger would shorten the code by a lot.
11:51, 2nd Nov 2013
Maker: Requires many fixes
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
the pentagram concept is quite creative and cool, add a map boundary.

POST TRIGGERS:

The pentagram creation can merged into 1 line by doing a loop and array point IF YOU USE HASHTABLE :D
because hashtable can does 2D Arrays to save the pentagram creation point and attached a MUI Data or ID.

EDIT:

Pausing caster is bad.

EDIT2:

Your spell is leaking by misplacing the removing of this:
  • Set TargetPoint = (Position of PG_Caster)
You need to remove it in where you'd set it.
 
Level 19
Joined
Mar 18, 2012
Messages
1,716
Things like PG_SpecialEffect, PentaEdgeRadius, TesterSpell_Damage ( this a bad variable name), TesterSpell_Duration should be in an on map init trigger, since they never change (yet).

Do not pause your caster, there are better ways.
Like Jake Zinc said, you should use an hashtable and loop through it.

The iteration of your Pental_edges is explicit and regular, just use a little math or think of a way how one Location points to the next one, this reduces your code to a minimum.
Just the start is little different since its create effect, move, face to Point 4.
Beside thats its 1,2 -> 2,3 ->3,4 -> 4,1.
 
Last edited:
Level 20
Joined
Aug 13, 2013
Messages
1,696
^ Well hashtable can do 2d arrays that's why the pentagram edges can be loop.

"What can I exactly do to replace the pausing of the unit?"

You can use unit's propwindow set to 0 like this:
  • -------- FIRST: SAVE THE UNIT'S PROPWINDOW ( DEFAULT ) --------
  • Custom Script: set udg_MY_UNIT_PROPWINDOW[ udg_ID ] = GetUnitPropWindow( udg_YOUR_UNIT )
  • -------- SECOND: SET THE UNIT'S PROPWINDOW TO 0. --------
  • Custom Script: call SetUnitPropWindow( udg_YOUR_UNIT, 0 )
  • -------- THIRD: IF THE SPELL IS FINISH THEN SET THE UNIT'S PROPWINDOW TO THE SAVED ORIGINAL UNIT'S PROPWINDOW. --------
  • Custom Script: call SetUnitPropWindow( udg_YOUR_UNIT, MY_UNIT_PROPWINDOW[ udg_ID ] )
Do you want me to elaborate the whole function ^^?
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
  • -------- FIRST: SAVE THE UNIT'S PROPWINDOW ( DEFAULT ) --------
  • Custom Script: set udg_MY_UNIT_PROPWINDOW[ udg_ID ] = GetUnitPropWindow( udg_YOUR_UNIT )
  • -------- SECOND: SET THE UNIT'S PROPWINDOW TO 0. --------
  • Custom Script: call SetUnitPropWindow( udg_YOUR_UNIT, 0 )
  • -------- THIRD: IF THE SPELL IS FINISH THEN SET THE UNIT'S PROPWINDOW TO THE SAVED ORIGINAL UNIT'S PROPWINDOW. --------
  • Custom Script: call SetUnitPropWindow( udg_YOUR_UNIT, MY_UNIT_PROPWINDOW[ udg_ID ] )
I'll mark the contents with bold letters.

Custom Script: set udg_MY_UNIT_PROPWINDOW[ udg_ID ] = GetUnitPropWindow( udg_YOUR_UNIT )
Custom Script: call SetUnitPropWindow( udg_YOUR_UNIT, 0 )
Custom Script: call SetUnitPropWindow( udg_YOUR_UNIT, MY_UNIT_PROPWINDOW[ udg_ID ] )

Contents:

1) Custom Script = the custom script can be found in GUI Function, In this function you can write a single JASS Line or Scripts.

2) set = set is the keyword for setting a variable in JASS lines or scripts. Remember: JASS are case sensitives.

3) udg_ = udg_ thingy is for the global variable that created in the Variable Creator in GUI. udg_ is a prefix from global variables in GUI. "udg" stands for User Defines Global. You must use udg_ if you're setting a global variable in JASS.

4) MY_UNIT_PROPWINDOW = This is a real variable, this will be the variable for getting or saving the unit's default propwindow angle.

5) [ udg_ID ] = The MY_UNIT_PROPWINDOW must be a real array variable to pass the data to the another trigger that will make it MUI.

6) GetUnitPropWindow = this is the function for getting and saving the unit's default propwindow angle. The parameters or function takes is a unit variable:
GetUnitPropWindow( THE_UNIT ).

7) call = this is the keyword for JASS in calling actions, functions and etc.
that's why we use this.

8) SetUnitPropWindow = this is the function for setting the unit's propwindow angle. The parameters are: Unit Variable and Real, so we do set the unit's propwindow angle to 0 because it will disable the movement speed.

For making the unit's propwindow to normal then you would set it's propwindow angle to the default saved unit's propwindow.
 
Level 16
Joined
Jul 31, 2012
Messages
2,217
??? Review

Personal Words

Review

Suggestions

Rating

Judgement

Note

Spell is cool,, not laggy
Configuration Trigger is missing

Don't use
  • (PGCaster_Group is empty) Equal to True
use a counter instead

225233-albums6523-picture74070.jpg
225233-albums6523-picture74105.jpg
If You want me to review an Update of This Spell, Please Notify me this by VM or PM
 
Top