Warcraft III resources & community, 2003–2006 · archived

Spell "Arena"

11 posts
#1

Spell "Arena"

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?
#2
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.
#3
With, ofcourse, all the leaks plugged.
#4
yea, change the units collision size or whatever or change the larger for interger A number to that
#5
i meant leaks as in

Position of Triggering Unit

etc, etc
#6
Oh my god that is leaky... :shock:
(((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--
#7
Question from an obviously newb trigger maker and stuff... What are leaks exactly and what is so bad about them?
#8
Well, think of it this way

Pretend locations are units.

If you have too many units, it lags, right?

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

Custom Script: call RemoveLocation( udg_x )

Replacing x with your variable's name.
#9
So if you say possition of casting target for example, it saves that location untill the game is over?
#10
Yes, unless you clean it up.
#11
Why does it do that even after the trigger is done? -confuzled of the purpose of saving the positions so long-