Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Spell "Arena"

Discussion in 'Triggers & Scripts' started by EveOfFire, Oct 28, 2006.

  1. EveOfFire

    EveOfFire

    Joined:
    Oct 17, 2006
    Messages:
    73
    Resources:
    0
    Resources:
    0
    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. Shamanruler

    Shamanruler

    Joined:
    Mar 29, 2004
    Messages:
    224
    Resources:
    1
    Maps:
    1
    Resources:
    1
    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. PurplePoot

    PurplePoot

    Joined:
    Dec 14, 2005
    Messages:
    11,161
    Resources:
    3
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    With, ofcourse, all the leaks plugged.
     
  4. Shamanruler

    Shamanruler

    Joined:
    Mar 29, 2004
    Messages:
    224
    Resources:
    1
    Maps:
    1
    Resources:
    1
    yea, change the units collision size or whatever or change the larger for interger A number to that
     
  5. PurplePoot

    PurplePoot

    Joined:
    Dec 14, 2005
    Messages:
    11,161
    Resources:
    3
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    i meant leaks as in

    Position of Triggering Unit

    etc, etc
     
  6. donut3.5

    donut3.5

    Joined:
    Feb 22, 2006
    Messages:
    3,389
    Resources:
    31
    Models:
    20
    Icons:
    9
    Maps:
    1
    Tutorials:
    1
    Resources:
    31
    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. EveOfFire

    EveOfFire

    Joined:
    Oct 17, 2006
    Messages:
    73
    Resources:
    0
    Resources:
    0
    Question from an obviously newb trigger maker and stuff... What are leaks exactly and what is so bad about them?
     
  8. PurplePoot

    PurplePoot

    Joined:
    Dec 14, 2005
    Messages:
    11,161
    Resources:
    3
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    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. EveOfFire

    EveOfFire

    Joined:
    Oct 17, 2006
    Messages:
    73
    Resources:
    0
    Resources:
    0
    So if you say possition of casting target for example, it saves that location untill the game is over?
     
  10. PurplePoot

    PurplePoot

    Joined:
    Dec 14, 2005
    Messages:
    11,161
    Resources:
    3
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    3
    Yes, unless you clean it up.
     
  11. EveOfFire

    EveOfFire

    Joined:
    Oct 17, 2006
    Messages:
    73
    Resources:
    0
    Resources:
    0
    Why does it do that even after the trigger is done? -confuzled of the purpose of saving the positions so long-