• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Phantasm

  • Like
Reactions: Oljin
Phantasm

Description: Blademaster conjures an illusion of himself spinning towards the target point, causing certain damage to enemies within AoE.

Level 1: 125 Damage / 100 Radius
Level 2: 225 Damage / 150 Radius
Level 3: 325 Damage / 200 Radius
Level 4: 425 Damage / 250 Radius
How to Import:

1. File>Preferences>General Tab>Check [Automatically create unknown variables]
2. Trigger Module>Copy [Phantasm] Folder>Paste to your map
3. Object Editor Module>Copy [Dummy], Copy [Create Illusion], & Copy [Phantasm]>Paste to your map
Credits:

@Hanky - GUI Dynamic Indexing
Changelogs:

v1.0 - Release
v1.1 - (Minor Changes)
Changed button position for Phantasm
Added a screenshot
Transferred
  • Unit spawns a summoned unit
to Phantasm Illusion
v1.2 - Replaced
  • Move unit instantly to
with SetUnitX and SetUnitY
Previews
Contents

Just another Warcraft III map (Map)

Reviews
MyPad
Spell Review: Notes: There is a certain variable that would be better off being declared as another GUI type, since one can't guarantee that the imported spell has the same rawcode. udg__P_Dummy_Ability In trigger Phantasm Loop, there is a For...
Level 13
Joined
Mar 29, 2012
Messages
530
Though the idea is simple, but I like it.

Another suggestion from me is that you should use Linked List. ;)
You can search for "Linked List" here. Or I thought you understand JASS syntax, you can see my spell for how to apply this indexing system.
 
Level 14
Joined
Oct 19, 2014
Messages
187
@Ofel: Copy that

I'll move it
empty.gif
join.gif
unit.gif
Unit - Move P__Illusion[P_TempInt] instantly to (Point(P__X[P_TempInt], P__Y[P_TempInt])), facing (Point(P__TargetX[P_TempInt], P__TargetY[P_TempInt]))
Doing this takes ''(Point(P__X[P_TempInt], P__Y[P_TempInt])" inside of a calls? I think you will make a point that cannot be removed.

Do this way instead:
empty.gif
join.gif
page.gif
Custom script: call SetUnitX(udg_P__Dummy, udg_P__X[udg_P_TempInt])
empty.gif
join.gif
page.gif
Custom script: call SetUnitY(udg_P__Dummy, udg_P__Y[udg_P_TempInt])

empty.gif
join.gif
page.gif
Custom script: set udg_P__Illusion[udg_P_TempInt] = GetSummonedUnit()
what is the purpose of scriping this one?

empty.gif
join.gif
page.gif
Trigger - Add to Phantasm_Illusion <gen> the event (A unit Spawns a summoned unit)
I think putting this on a cast trigger without condition that has a reason to create it once, you just spam creating that event into your trigger
this will happen

Events
Unit - A unit Spawns a summoned unit
Unit - A unit Spawns a summoned unit
Unit - A unit Spawns a summoned unit
Unit - A unit Spawns a summoned unit
Unit - A unit Spawns a summoned unit
Unit - A unit Spawns a summoned unit
Unit - A unit Spawns a summoned unit
Unit - A unit Spawns a summoned unit
Unit - A unit Spawns a summoned unit
Unit - A unit Spawns a summoned unit
Unit - A unit Spawns a summoned unit
Unit - A unit Spawns a summoned unit
Unit - A unit Spawns a summoned unit
Unit - A unit Spawns a summoned unit
Unit - A unit Spawns a summoned unit
Unit - A unit Spawns a summoned unit
Unit - A unit Spawns a summoned unit
Unit - A unit Spawns a summoned unit
Unit - A unit Spawns a summoned unit
Unit - A unit Spawns a summoned unit
Conditions
Actions

I suggest to put it right through :)
 
Unit - Move P__Illusion[P_TempInt] instantly to (Point(P__X[P_TempInt], P__Y[P_TempInt])), facing (Point(P__TargetX[P_TempInt], P__TargetY[P_TempInt]))
Doing this takes ''(Point(P__X[P_TempInt], P__Y[P_TempInt])" inside of a calls? I think you will make a point that cannot be removed.
I think there's no problem with that since I am not storing any variable every call.
Custom script: set udg_P__Illusion[udg_P_TempInt] = GetSummonedUnit()
what is the purpose of scriping this one?
The point of this one, Is storing the last summoned unit or illusion into a variable.
Trigger - Add to Phantasm_Illusion <gen> the event (A unit Spawns a summoned unit)
I think putting this on a cast trigger without condition that has a reason to create it once, you just spam creating that event into your trigger
this will happen
forgot to upload the updated version, thanks to you

Thank you for your comment, please leave a rating if you find this resource useful.
 
Level 39
Joined
Feb 27, 2007
Messages
4,992
I think there's no problem with that since I am not storing any variable every call.
Wrong; you in fact leak two points every time that line is run. Using Point(someX, someY) creates a point (location) object whether you store it or not. If you did it by SetUnitX/Y as @JC Helas suggested, then you would be using the X/Y coordinates directly and wouldn't be 'making' a point, thus no leak. The other advantage of SetUnitX/Y is that they don't take unit model collision or ground pathing into account when placing the unit precisely there.
The point of this one, Is storing the last summoned unit or illusion into a variable.
No, JC means why write that line as a custom script line instead of a normal GUI set variable line?
 
Wrong; you in fact leak two points every time that line is run. Using Point(someX, someY) creates a point (location) object whether you store it or not. If you did it by SetUnitX/Y as @JC Helas suggested, then you would be using the X/Y coordinates directly and wouldn't be 'making' a point, thus no leak. The other advantage of SetUnitX/Y is that they don't take unit model collision or ground pathing into account when placing the unit precisely there.
Already updated, thanks tho
 

Spell Review:

Notes:

  • There is a certain variable that would be better off being declared as another GUI type, since one can't guarantee that the imported spell has the same rawcode. udg__P_Dummy_Ability

  • In trigger Phantasm Loop, there is a For Group subroutine that also utilizes the FirstOfGroup native instead of the GUI provided (Picked unit). Is this intended or a functional error?

  • In the filters within the For Group subroutine (mentioned above), the conditions behave in an odd manner, such that the filtering system only compares the unit state of a target unit to the flag, and not act as a switch, whereby the aforementioned comparison will only be made if the filter flag is false. [1]

Overview:


The spell functions properly, and does not have leaks, as of the most recent version. There might be a few logical flaws, but these are not of great bearing that they bring the spell to Awaiting Update. As referenced in index [1]:


The filters are like this
unit.getState(unitstate) == filterFlag

and not like this
filterFlag or (not filterFlag and (unit.getState(unitstate) == false))

Status:

  • Approved

 
Level 4
Joined
Mar 21, 2014
Messages
79
the spell is quite nice! i use it in my map.
I like that the it does AoE damage and then stays for a while :)

But the first cast always lags, is it possible to preload somehow the models such that the first one does not lag?
 
Top