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

Water Wall

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
EDIT: SPELL UPDATE!!!!(Add LOCUST)!!!!!!!!!!!>>(17.3.2011; 21:21)<<!!!!



TRIGGERS:

events:
Unit - A unit finishes casting abilitA

conditions:
(Ability being cast) Equal to Water Wall by Warilock

actions:
For each (Integer A) from 1 to 120 do (actions)

loop - Actions:
Unit - Create 1 Water Wall by Warilock for Neutral passive at ((Position of(Triggering unit)) offset by 700.00 towards (-3.00 x (Real((Integer A)))) degrees) facing Default building facing degrees
Unit - Make (Last created unit) Invulnerable
------------------------------------------------------------------------------------
Unit - Create a Water Wall by Warilock corpse for Neutral passive at (Position of(Trigering unit))

Keywords:
Water Wall, Wall, Water, Warilock, GB_Warilock
Contents

Water Wall by Warilock (Map)

Reviews
Bribe: Unbelievable amount of units and memory leaks. Definitely does not belong in a practical spell environment. Maybe good as a cinematic. Rejected.

Moderator

M

Moderator

Bribe:

Unbelievable amount of units and memory leaks. Definitely does not belong in a practical spell environment. Maybe good as a cinematic.

Rejected.
 
Maker. You mispelled "Practice"! Reporting Post now -.- ... :p jk ^^

This spell is way too simple.

It leaks since it doesn't store a location variable and removes it later, causing the game to lag like hell. This isn't the only way though. You can store x and y real variables, but since you're a beginner, i think that would be kinda advanced for you :p

Just stick to locations for now, and when you move on to JASS, then you can start using X and Y reals.

To fix the spell:

Change the event to "Starts the effects of an ability".

Variable Name: What it's used for.

  • (WW_Loc): Use a location variable to store the position of the caster
  • (WW_Lvl): Use an integer to store the level ability incase you wanna add anything extra having to do with ability level.
  • (WW_Caster): Use a unit variable to store the caster
  • (WW_Radius): Use a real variable to store the offset
  • (WW_TempLoc): Use another location variable for the loop to store a location that is the offset of WW_Loc by a value of WW_Radius.
  • (WW_DummySpawnCount): Use this integer to store the number of dummies to create.
  • (WW_DummyAngleOffset): Use this real to determine what angle offset is needed for the dummy spawning. It would be equal to (360/(WW_DummySpawnCount)). Since your a beginner, i'm going to point out to you the fact that you should convert from integer to real to insert the WW_DummySpawnCount in the arithmetic.
  • (WW_int): Use this integer in the integer variable loop.
  • (WW_dest): Use this boolean to decide whether or not the spell destroys destructibles.
-----------------------------------------------
Use (integer variable) instead of (integer a)

Let the loop manipulate the integer variable for values ranging from 1 to WW_DummySpawnCount and when you spawn the dummies in the loop, give them a generic expiration timer.

Then, if WW_dest was set to true, it would destroy all destructibles within a radius of WW_Radius. You would use an If/Then/Else Loop here.

NOTE: DO NOT ADD THE ACTION "DO NOTHING" IN THE ELSE STATEMENT.

Finally, you would add these two actions in custom script:
JASS:
call RemoveLocation(udg_WW_Loc)
call RemoveLocation(udg_WW_TempLoc)

And one more thing, give the dummy units the locust ability instead of making them invulnerable.


Good luck :)

And i hope you actually listen to me cuz this post took me >10 minutes to work on -.- ;p
 
  • Actions
    • -------- ------------------ --------
    • -------- Storing the casting unit into a variable --------
    • -------- ------------------ --------
    • Set WW_Caster = (Triggering unit)
    • -------- ------------------ --------
    • -------- Storing the level ability --------
    • -------- ------------------ --------
    • Set WW_lvl = (Level of (Ability being cast) for WW_Caster)
    • -------- ------------------ --------
    • -------- Storing the position of the caster --------
    • -------- ------------------ --------
    • Set WW_Loc = (Position of WW_Caster)
    • -------- ------------------ --------
    • -------- CONFIGURABLES --------
    • -------- ------------------ --------
    • -------- This variable decides whether we should destroy destructibles or not. --------
    • -------- ------------------ --------
    • Set WW_DestroyDestructibles = True
    • -------- ------------------ --------
    • -------- How many dummies we have --------
    • -------- ------------------ --------
    • Set WW_DummyCount = 80
    • -------- ------------------ --------
    • -------- The radius of the water wall --------
    • -------- ------------------ --------
    • Set WW_Radius = 700.00
    • -------- ------------------ --------
    • -------- The angle offset for the polar projections depending on the number of dummies. --------
    • -------- ------------------ --------
    • Set WW_AngleOffset = (360.00 / (Real(WW_DummyCount)))
    • -------- ------------------ --------
    • For each (Integer WW_int) from 1 to WW_DummyCount, do (Actions)
      • Loop - Actions
        • Set WW_TempLoc = (WW_Loc offset by WW_Radius towards (WW_AngleOffset x (Real(WW_int))) degrees)
        • Unit - Create 1 Water Wall by Warilock Dummy2 for Neutral Passive at WW_TempLoc facing Default building facing degrees
        • Set WW_TempDummy = (Last created unit)
        • -------- ------------------ --------
        • -------- I'm giving the dummies a lifespan of 10 seconds. --------
        • -------- ------------------ --------
        • Unit - Add a 10.00 second Generic expiration timer to WW_TempDummy
        • -------- ------------------ --------
        • -------- I'm giving them an immolation ability so they can deal damage. --------
        • -------- ------------------ --------
        • Unit - Add Dummy_immolation to WW_TempDummy
        • Unit - Set level of Dummy_immolation for WW_TempDummy to WW_lvl
        • -------- ------------------ --------
        • -------- I'm nulling the dummy variable and removing the location to avoid leaks --------
        • -------- ------------------ --------
        • Custom script: set udg_WW_TempDummy = null
        • Custom script: call RemoveLocation(udg_WW_TempLoc)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • WW_DestroyDestructibles Equal to True
      • Then - Actions
        • Destructible - Pick every destructible within WW_Radius of WW_Loc and do (Actions)
          • Loop - Actions
            • Destructible - Kill (Picked destructible)
      • Else - Actions
    • Custom script: call RemoveLocation(udg_WW_Loc)
I took the liberty of fixing the spell for you :p

I wanted to add a loop trigger so that the wall would move with the caster, but it seems that you lack.... the ability to .... comprehend the... nevermind ;p

Read the comments for each action.

The spell is still too simple, so before uploading one similar to this, plz read some tutorials, and learn how to use loops.
Also, you need to learn about removing leaks.

One more thing, don't double post. Moderators HATE that.
 
Level 20
Joined
Jul 12, 2010
Messages
1,717
emm...
this spell is not finished...
since it's called "water wall" i suppose it blocks all units from entering and leaving the circle...
all you managed to do is to create the special effects...
anyway you should do what Magtheridon96 if you want to fix your spell...
ill give you a 3/5 for trying ;p

EDIT:
as i see you didn't even bother to update your spell? o_O
 
Last edited:
Top