Spell Warp Field

Tom_Kazansky

--- wraith it ! ---
Reaction score
157
Warp Field
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Warps space time arround the caster, creating a barrier through which enemies cannot pass, but friendly units can.
All enemy units within the barrier when this spell is cast are forced out. While the Warp Field is active you have vision of it.
Also damage enemies.​

  • MUI: Yes
  • GUI/JASS: GUI
  • Leakless: Yes (I think)
  • Lagless: I think it has lags but not too much

A spell I saw at theHive (Warp Field by Cromatycha) but Cromatycha's triggering is not good, and the effect is rather fun and cool, so I decide to remake it and also, someone request me to do it :)

  • Screenshot:
    attachment.php
  • Code
    Trigger:
    • WarpField Init
      • Events
        • Map initialization
      • Conditions
      • Actions
        • -------- set the number of dummies --------
        • -------- recommended 18 --------
        • Set WarpField_NumberDummies = 18
        • -------- push speed, because we use 0.025s timer, the PushSpeed must be only equal to 0.025 x of actual speed --------
        • Set WarpField_PushSpeed = 15.00


    Trigger:
    • WarpField Cast
      • Events
        • Unit - A unit Starts the effect of an ability
      • Conditions
        • (Ability being cast) Equal to Warp Field
      • Actions
        • Set TempUnit = (Triggering unit)
        • Set WarpField_InsCount = (WarpField_InsCount + 1)
        • Set WarpField_Caster[WarpField_InsCount] = TempUnit
        • Set WarpField_Pos[WarpField_InsCount] = (Position of TempUnit)
        • -------- 10 seconds duration + 1 duration of fade in/out => 11 seconds total --------
        • -------- 11 seconds / 0.025s timer = 440 ticks --------
        • Set WarpField_Tick[WarpField_InsCount] = 440
        • Set WarpField_TotalTick[WarpField_InsCount] = 440
        • -------- damage per second --------
        • Set WarpField_Damage[WarpField_InsCount] = (50.00 + (50.00 x (Real((Level of Warp Field for TempUnit)))))
        • -------- set damage to zero to disable damaging --------
        • -------- damage per 0.025s --------
        • Set WarpField_Damage[WarpField_InsCount] = (WarpField_Damage[WarpField_InsCount] / 40.00)
        • Custom script: set udg_WarpField_Dummies[udg_WarpField_InsCount] = CreateGroup()
        • For each (Integer TempInt) from 1 to WarpField_NumberDummies, do (Actions)
          • Loop - Actions
            • Unit - Create 1 Dummy - Warp Field for (Owner of TempUnit) at WarpField_Pos[WarpField_InsCount] facing ((Real(TempInt)) x (360.00 / (Real(WarpField_NumberDummies)))) degrees
            • Set TempUnit2 = (Last created unit)
            • Unit Group - Add TempUnit2 to WarpField_Dummies[WarpField_InsCount]
            • Unit - Add Crow Form to TempUnit2
            • Unit - Remove Crow Form from TempUnit2
            • Animation - Change TempUnit2 flying height to 65.00 at 0.00
            • Animation - Play TempUnit2's Birth animation
            • Animation - Queue TempUnit2's Stand animation
            • Animation - Change TempUnit2's animation speed to 180.00% of its original speed
        • -------- we have to use Custom Script (JASS) for MUI sound --------
        • Custom script: set udg_WarpField_Sound[udg_WarpField_InsCount] = CreateSound( "Abilities\\Spells\\Human\\CloudOfFog\\CloudOfFogLoop1.wav", true, true, false, 100, 100, "SpellsEAX" )
        • Sound - Play WarpField_Sound[WarpField_InsCount] at 100.00% volume, located at WarpField_Pos[WarpField_InsCount] with Z offset 0.00


    Trigger:
    • WarpField Act
      • Events
        • Time - Every (1.00 / 40.00) seconds of game time
      • Conditions
      • Actions
        • For each (Integer WarpField_Looper) from 1 to WarpField_InsCount, do (Actions)
          • Loop - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • WarpField_Tick[WarpField_Looper] Greater than 0
              • Then - Actions
                • -------- animating --------
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • WarpField_Tick[WarpField_Looper] Equal to (WarpField_TotalTick[WarpField_Looper] - 20)
                  • Then - Actions
                    • Unit Group - Pick every unit in WarpField_Dummies[WarpField_Looper] and do (Actions)
                      • Loop - Actions
                        • Set TempUnit = (Picked unit)
                        • Animation - Change TempUnit's animation speed to 100.00% of its original speed
                        • Animation - Play TempUnit's Stand animation
                    • Destructible - Pick every destructible within 500.00 of WarpField_Pos[WarpField_Looper] and do (Actions)
                      • Loop - Actions
                        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          • If - Conditions
                            • (Max life of (Picked destructible)) Equal to 50.00
                          • Then - Actions
                            • Destructible - Kill (Picked destructible)
                          • Else - Actions
                  • Else - Actions
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • WarpField_Tick[WarpField_Looper] Equal to 20
                  • Then - Actions
                    • Unit Group - Pick every unit in WarpField_Dummies[WarpField_Looper] and do (Actions)
                      • Loop - Actions
                        • Set TempUnit = (Picked unit)
                        • Animation - Change TempUnit's animation speed to 350.00% of its original speed
                        • Animation - Play TempUnit's Death animation
                  • Else - Actions
                • -------- Fade In --------
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • WarpField_Tick[WarpField_Looper] Greater than or equal to (WarpField_TotalTick[WarpField_Looper] - 20)
                  • Then - Actions
                    • Unit Group - Pick every unit in WarpField_Dummies[WarpField_Looper] and do (Actions)
                      • Loop - Actions
                        • Set TempUnit = (Picked unit)
                        • Animation - Change TempUnit's vertex coloring to (100.00%, 100.00%, 100.00%) with (5.00 x (Real((20 - (WarpField_TotalTick[WarpField_Looper] - WarpField_Tick[WarpField_Looper])))))% transparency
                  • Else - Actions
                • -------- Warping --------
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • WarpField_Tick[WarpField_Looper] Less than (WarpField_TotalTick[WarpField_Looper] - 20)
                    • WarpField_Tick[WarpField_Looper] Greater than 20
                  • Then - Actions
                    • Set TempGroup = (Units within 435.00 of WarpField_Pos[WarpField_Looper] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of WarpField_Caster[WarpField_Looper])) Equ
                    • Unit Group - Pick every unit in TempGroup and do (Actions)
                      • Loop - Actions
                        • Set TempUnit = (Picked unit)
                        • Set TempLoc = (Position of TempUnit)
                        • Set TempLoc2 = (TempLoc offset by WarpField_PushSpeed towards (Angle from WarpField_Pos[WarpField_Looper] to TempLoc) degrees)
                        • -------- check pathing --------
                        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          • If - Conditions
                            • (Terrain pathing at TempLoc2 of type Walkability is off) Equal to True
                          • Then - Actions
                            • -------- cannot move --------
                            • -------- this move unit action will interrupt unit's order --------
                            • Unit - Move TempUnit instantly to TempLoc2
                          • Else - Actions
                            • -------- can move --------
                            • -------- these two don't interrupt unit's order --------
                            • Custom script: call SetUnitX( udg_TempUnit, GetLocationX(udg_TempLoc2 ) )
                            • Custom script: call SetUnitY( udg_TempUnit, GetLocationY(udg_TempLoc2 ) )
                        • -------- --- --------
                        • Special Effect - Create a special effect at TempLoc2 using Abilities\Spells\Undead\AbsorbMana\AbsorbManaBirthMissile.mdl
                        • Special Effect - Destroy (Last created special effect)
                        • Custom script: call RemoveLocation( udg_TempLoc )
                        • Custom script: call RemoveLocation( udg_TempLoc2 )
                        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          • If - Conditions
                            • WarpField_Damage[WarpField_Looper] Greater than 0.00
                          • Then - Actions
                            • Unit - Cause WarpField_Caster[WarpField_Looper] to damage TempUnit, dealing WarpField_Damage[WarpField_Looper] damage of attack type Spells and damage type Magic
                          • Else - Actions
                    • Custom script: call DestroyGroup( udg_TempGroup )
                  • Else - Actions
                • -------- Fade Out --------
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • WarpField_Tick[WarpField_Looper] Less than or equal to 20
                  • Then - Actions
                    • Unit Group - Pick every unit in WarpField_Dummies[WarpField_Looper] and do (Actions)
                      • Loop - Actions
                        • Set TempUnit = (Picked unit)
                        • Animation - Change TempUnit's vertex coloring to (100.00%, 100.00%, 100.00%) with (5.00 x (Real(WarpField_Tick[WarpField_Looper])))% transparency
                  • Else - Actions
                • -------- --- --------
                • Set WarpField_Tick[WarpField_Looper] = (WarpField_Tick[WarpField_Looper] - 1)
              • Else - Actions
                • Unit Group - Pick every unit in WarpField_Dummies[WarpField_Looper] and do (Actions)
                  • Loop - Actions
                    • Unit - Remove (Picked unit) from the game
                • Custom script: call RemoveLocation( udg_WarpField_Pos[udg_WarpField_Looper] )
                • Custom script: call DestroyGroup( udg_WarpField_Dummies[udg_WarpField_Looper] )
                • Sound - Stop WarpField_Sound[WarpField_Looper] After fading
                • Sound - Destroy WarpField_Sound[WarpField_Looper]
                • Set WarpField_Caster[WarpField_Looper] = WarpField_Caster[WarpField_InsCount]
                • Set WarpField_Dummies[WarpField_Looper] = WarpField_Dummies[WarpField_InsCount]
                • Set WarpField_Sound[WarpField_Looper] = WarpField_Sound[WarpField_InsCount]
                • Set WarpField_Pos[WarpField_Looper] = WarpField_Pos[WarpField_InsCount]
                • Set WarpField_Tick[WarpField_Looper] = WarpField_Tick[WarpField_InsCount]
                • Set WarpField_TotalTick[WarpField_Looper] = WarpField_TotalTick[WarpField_InsCount]
                • Set WarpField_InsCount = (WarpField_InsCount - 1)
                • -------- -- --------
                • Set WarpField_Looper = (WarpField_Looper - 1)
  • Readme
    How to import:
    - Copy ability: Warp Field (A000)
    - Copy triggers: WarpField Init, WarpField Cast, WarpField Act.
    Remember to check: File \ Preferences \ General \ Automatically create unknown variables while pasting trigger data

    Modification:
    - Change WarpField_Tick for the duration of the spell
    - Change WarpField_Damage for the damage of the spell
    - Change WarpField_PushSpeed for the pushing speed of the spell
    - Change WarpField_NumberDummies for the number of dummy units

    Note:
    - You can set 'Initial Value' for "WarpField_NumberDummies" and "WarpField_PushSpeed" so you wont need trigger WarpField Init

    Credit:
    - Thank Cromatycha for the idea.
Please comment :)

EDIT: first update: fix a leak and timer duration
 

Attachments

  • warp field.jpg
    warp field.jpg
    337.7 KB · Views: 1,972
  • [Spell] Warp Field.w3x
    51 KB · Views: 603

Nexor

...
Reaction score
74
- I said I use 0.025s timer while WarpField Act trigger use 0.03s timer, well, it's because of the "round up" in GUI, I don't know how to explain clearly, sorry

I don't understand this "round-up" thing.
You can use the arithmical function in GUI to create real values between 0.02 and 0.03.
To make a 0.025 value just use this: Real(1/40)
 

Tom_Kazansky

--- wraith it ! ---
Reaction score
157
yeah, I don't know how to explain this, but:
Code:
Time - Every [B][COLOR="Red"]0.03[/COLOR][/B] seconds of game time
I typed in 0.025 but it still appears 0.03 :(
---
anyways, how is the spell ? is it fun ? :D
attack some melee creep, cast this spell and you will see :D
 

Crusher

You can change this now in User CP.
Reaction score
121
Nifty spell you re-created there Tom. It's awesome.

+rep.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Haven't tried the spell out, but the code looks nice (With one exception :p)

Found a leak, though...

Trigger:
  • Set TempGroup = (Units within 435.00 of WarpField_Pos[WarpField_Looper] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of WarpField_Caster[WarpField_Looper])) Equ


That's never destroyed...
 

Psiblade94122

In need of sleep
Reaction score
138
for the speed, to keep things simple you can do this

Timer .04 (.04 flat) this makes the trigger run 25 times per second, makes the math simple (as opposed to .03 which will run 33 times a second 34 for 1.2)

You can make the move speed based on normal wc3 speed instead of having to do the counculations first, when you actually use that speed however you have to divide it by 25 (if your using .04), because this runs a flat 25 times a second, the distance moved per second is accurate to the value you put in

The .03 your getting is because wc3 uses to the nearest hundreths for timers, so .025 will round up to .03. It is running every .03 seconds, not .025 seconds, which might make your spell slower then it really is

aside from that suggestion, cool spell +rep
 

Tom_Kazansky

--- wraith it ! ---
Reaction score
157
Update !
----
@Komaqtion, I totally forgot about that, thanks :p

@Psiblade94122, I still want to use 0.025 and 1 / 40 works :D
 

Joker(Div)

Always Here..
Reaction score
86
for the speed, to keep things simple you can do this

Timer .04 (.04 flat) this makes the trigger run 25 times per second, makes the math simple (as opposed to .03 which will run 33 times a second 34 for 1.2)

You can make the move speed based on normal wc3 speed instead of having to do the counculations first, when you actually use that speed however you have to divide it by 25 (if your using .04), because this runs a flat 25 times a second, the distance moved per second is accurate to the value you put in

The .03 your getting is because wc3 uses to the nearest hundreths for timers, so .025 will round up to .03. It is running every .03 seconds, not .025 seconds, which might make your spell slower then it really is

aside from that suggestion, cool spell +rep
I believe you are wrong. GUI shows the rounded up numbers because of limited space, the the number itself doesn't change.

Btw, how did you turn the teleport model sideways?
 

Tom_Kazansky

--- wraith it ! ---
Reaction score
157
>Btw, how did you turn the teleport model sideways?

a dummy with model Teleport and Art - Maximum Pitch Angle (degree): -90, use Shift + Enter (or Double Click) to enter negative values :)
 

GetTriggerUnit-

DogEntrepreneur
Reaction score
129
yeah, I don't know how to explain this, but:
Code:
Time - Every [B][COLOR="Red"]0.03[/COLOR][/B] seconds of game time
I typed in 0.025 but it still appears 0.03 :(

Thats a GUI bug.

Reals in GUI can only appear with 2 decimals 1.55 when in Jass it can be 3 decimals 1.555.
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
Found a leak, though...

Trigger:
  • Set TempGroup = (Units within 435.00 of WarpField_Pos[WarpField_Looper] matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of (Owner of WarpField_Caster[WarpField_Looper])) Equ


That's never destroyed...

Update !
----
@Komaqtion, I totally forgot about that, thanks :p

Unless the code in the map is different from the posted code, the leak isn't yet fixed. I'm going to graveyard this until it is. Other than that, the spell looks great and is ready for approval. :)
 

Tom_Kazansky

--- wraith it ! ---
Reaction score
157
I have confirmed this, the code in map and the posted code are the same :) the leak is fixed!

your post made me thought that I didn't edit the posted code :p
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top