HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Why this isn't working?

12-21-2004, 02:07 PM#1
d4rkarch0n
Code:
DimensionDoor
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Dimension Door
    Actions
        Unit - Order (Triggering unit) to Stop
        Animation - Play (Triggering unit)'s looping animation
        Wait 1.00 seconds
        Unit - Create 1 DimensionDoor for (Owner of (Triggering unit)) at ((Position of (Triggering unit)) offset by (30.00, 0.00)) facing Default building facing degrees
        Set DimensionDoor1 = (Last created unit)
        Unit - Order (Triggering unit) to Move To (Position of DimensionDoor1)
        Wait 1.00 seconds
        Unit - Create 1 DimensionDoor for (Owner of (Triggering unit)) at (Target point of ability being cast) facing Default building facing degrees
        Set DimensionDoor2 = (Last created unit)
        Camera - Pan camera for (Owner of (Triggering unit)) to (Position of DimensionDoor2) over 1.00 seconds
        Unit - Move (Triggering unit) instantly to (Position of DimensionDoor2)
        Unit - Order (Triggering unit) to Move To ((Position of DimensionDoor2) offset by (20.00, 0.00))
        Wait 2.00 seconds
        Unit - Remove DimensionDoor1 from the game
        Unit - Remove DimensionDoor2 from the game

The problem I've detected is that this trigger does not creat a unt at (target point of ability being cast), he creates it at (position of triggering unit), or he considers them the same place, dont know why, cuz I'm using Mass Teleport as base skill.

Could someone help? :D
12-21-2004, 02:50 PM#2
Guest
"Target point of ability being cast" is reset after a wait. Use a point variable to store it.
12-21-2004, 02:54 PM#3
Guest
I guess the point where you order hero to teleport with mass teleport is not the target of mass teleport. It seems to me like the target is actually the own hero and the area around him, and thats why it creates that unit in the position of the caster. Maybe it could work if you create that 2nd door at the position of triggering unti after the wait, but you'll have to adjust times so it doesn't look like the unit arrives before the door appears.

Salutions®
12-21-2004, 04:35 PM#4
Anitarf
As ctb said, the spell event responses, such as "target point of ability being cast", don't act as local variables and can get reset during a wait. You can avoid this by basing your spell on a summon spell like sentry wards, and using the summon events/responses (instead of "target point of ability being cast", you would use "position of (summoned unit)")