• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Spell "Arena"

Status
Not open for further replies.
Level 3
Joined
Oct 17, 2006
Messages
73
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?
 
Level 6
Joined
Mar 29, 2004
Messages
222
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.
 
Level 3
Joined
Oct 17, 2006
Messages
73
Question from an obviously newb trigger maker and stuff... What are leaks exactly and what is so bad about them?
 
Level 40
Joined
Dec 14, 2005
Messages
10,532
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.
 
Level 3
Joined
Oct 17, 2006
Messages
73
Why does it do that even after the trigger is done? -confuzled of the purpose of saving the positions so long-
 
Status
Not open for further replies.
Top