Maker. You mispelled "Practice"! Reporting Post now -.- ...
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
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