• 🏆 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!

[Spell Request] Swiftness

Status
Not open for further replies.
Level 12
Joined
Apr 26, 2008
Messages
830
Hi guys,
I'm working on a project and I need a simple spell to be done if possible, the spell is about invulnerability, the caster moves a lot of times to random region around the him in an AOE of 200 like this.

Set RandomPoint = ((Caster Position) with offset 200))
Move Caster to random region in RandomPoint

or something like this...

But it lasts 2 seconds so the caster should be invulnerable for 2 seconds and in this 2 seconds he teleports to alot of random points around him in an AOE of 200. This should be MUI GUI please +rep + credits.

EDIT:Add the Mirrorthing SFX everytime the caster teleports/moves.
 
Level 12
Joined
Apr 26, 2008
Messages
830
Hey wow so many replies thanks i will take a look at them now =)

EDIT:Well i like defskulls version more but there is a mistake.. if you observe you can see that the demon hunter doesn't teleport around his position but the postion around the other demon hunter so would be cool if you could fix it ... +rep anyways to Maker and of course Defskull!

EDIT2:I mean he teleports to the center of the map ..
 
Last edited:
Level 33
Joined
Mar 27, 2008
Messages
8,035
In "Swift Checking" trigger, move the:
  • Custom script: call RemoveLocation(udg_InitialLoc)
To the most below part in "Else - Actions" and it's gonna look like this:
  • Else - Actions
    • Unit - Remove Invulnerable (Neutral) from (Picked unit)
    • Hashtable - Clear all child hashtables of child (Key (Picked unit)) in SwiftTable
    • Unit Group - Remove (Picked unit) from SwiftGroup
    • Custom script: call RemoveLocation(udg_InitialLoc)
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Def, you should load the InitialLoc before the If condition, because you need it in both THEN and ELSE branches.

It's also a good idea to teleport the unit back to the initial loc when the spell ends, since the offset position might not be pathable, the unit could get stuck.
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
If it's like this, it won't get removed.
  • Unit Group - Pick every unit in SwiftGroup and do (Actions)
    • Loop - Actions
      • Set Duration = (Load (Key Duration) of (Key (Picked unit)) from SwiftTable)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Duration Greater than 0.00
        • Then - Actions
          • Set InitialLoc = (Load (Key INIT) of (Key (Picked unit)) in SwiftTable)
        • Else - Actions
          • Custom script: call RemoveLocation(udg_InitialLoc)
This is how it should be
  • Unit Group - Pick every unit in SwiftGroup and do (Actions)
    • Loop - Actions
      • Set Duration = (Load (Key Duration) of (Key (Picked unit)) from SwiftTable)
      • Set InitialLoc = (Load (Key INIT) of (Key (Picked unit)) in SwiftTable)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Duration Greater than 0.00
        • Then - Actions
        • Else - Actions
          • Custom script: call RemoveLocation(udg_InitialLoc)
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Use pastebin and PM it to me.

Locations default to center of the map, so either you have not initialized the hashtable or there's something else that makes the triggers return null for the loc.

EDIT: There's this line in Defskull's trigger:
  • Hashtable - Save Handle OfInitialLoc as (Key INIT) of (Key (Triggering unit)) in (Last created hashtable)
The last created hashtable might not be the one used by this ability. Change it to the correct hashtable. And tell defskull he should always double check his triggers.
 
Level 12
Joined
Apr 26, 2008
Messages
830
Use pastebin and PM it to me.

Locations default to center of the map, so either you have not initialized the hashtable or there's something else that makes the triggers return null for the loc.

EDIT: There's this line in Defskull's trigger:
  • Hashtable - Save Handle OfInitialLoc as (Key INIT) of (Key (Triggering unit)) in (Last created hashtable)
The last created hashtable might not be the one used by this ability. Change it to the correct hashtable. And tell defskull he should always double check his triggers.

Maybe some other trigger uses initialloc too as integer ... maybe if i change the names it will work i will try this
 
Level 12
Joined
Apr 26, 2008
Messages
830
Here are the triggers can you see if something doesn't work?!..

Btw... the Hashtables are created in another trigger...
 

Attachments

  • whats wrong.JPG
    whats wrong.JPG
    106.2 KB · Views: 37
Status
Not open for further replies.
Top