There was a spell in a map I saw, it made a small area that was cut off from everything but arrows, by making a bunch of rocks, how would I go about making that?
Arena Events Unit - A unit Begins casting an ability Conditions (Ability being cast) Equal to Arena Actions For each (Integer A) from 1 to 36, do (Actions) Loop - Actions Unit - Create 1 Rock for (Owner of (Triggering unit)) at (((Position of (Triggering unit)) offset by ((Distance between (Position of (Triggering unit)) and (Position of (Target unit of ability being cast))) / 2.00) towards (Facing of (Triggering unit)) degrees) offset by 500.00 towards ((Real((Integer A))) x 10.00) facing Default building facing degrees Unit - Make (Last created unit) Invulnerable Unit - Add a 30.00 second Generic expiration timer to (Last created unit)
That should make an encasement of invunerable stone around the caster and target. If you want to you could remove the invunerable feature so units could escape, or use a destructible, though it would be harder. anyways, my 2 cents.
Oh my god that is leaky... (((Position of (Triggering unit)) (Position of (Triggering unit)) (Position of (Target unit of ability being cast))) Though not as leaky as one of my triggs back in the day... it amounted to about 9 leaks. per .05 seconds. --donut3.5--
So, also, if you have too many LOCATIONS, it lags, so you gotta destroy them all. ( this also applies to anything but Integers, Reals, Strings, Booleans, and Codes )
To fix this, set every (location in this case) to its own variable, and after you're done using it, add this line