• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Triggering Problem

Status
Not open for further replies.
Level 9
Joined
Sep 5, 2007
Messages
358
I've got a problem while doing the special effects for a spell.
The spell is a ultimate summon, but lacks of special effects, so I made some dummy units to increase the special effect's size. The problem is that I use point variables to remove leaks when I create the dummies, but the dummies actually don't get created if I change the variable to the point of the ability being cast. When I change the variable to the position of the casting unit, the trigger works, but what I want is the effects appear in the position where the creature will be summoned.

Check the trigger and try to find the error asap, it's very important!

  • Effecting it
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to |cffAE5700Force of Nature|r (Animalist)
    • Actions
      • Set ForceOfNature_Point = (Target point of ability being cast)
      • Unit - Create 1 Dummy Force of Nature 4 for (Owner of (Casting unit)) at ForceOfNature_Point facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_ForceOfNature_Point)
      • Wait 0.30 seconds
      • Set ForceOfNature_Point = (Target point of ability being cast)
      • Unit - Create 1 Dummy Force of Nature 2 for (Owner of (Casting unit)) at ForceOfNature_Point facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_ForceOfNature_Point)
      • Wait 0.30 seconds
      • Set ForceOfNature_Point = (Target point of ability being cast)
      • Unit - Create 1 Dummy Force of Nature 1 for (Owner of (Casting unit)) at ForceOfNature_Point facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_ForceOfNature_Point)
      • Set ForceOfNature_Point = (Target point of ability being cast)
      • Unit - Create 1 Dummy Force of Nature 4 for (Owner of (Casting unit)) at ForceOfNature_Point facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_ForceOfNature_Point)
      • Wait 0.30 seconds
      • Set ForceOfNature_Point = (Target point of ability being cast)
      • Unit - Create 1 Dummy Force of Nature 1 for (Owner of (Casting unit)) at ForceOfNature_Point facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_ForceOfNature_Point)
      • Set ForceOfNature_Point = (Target point of ability being cast)
      • Unit - Create 1 Dummy Force of Nature 2 for (Owner of (Casting unit)) at ForceOfNature_Point facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_ForceOfNature_Point)
      • Wait 0.30 seconds
      • Set ForceOfNature_Point = (Target point of ability being cast)
      • Unit - Create 1 Dummy Force of Nature 3 for (Owner of (Casting unit)) at ForceOfNature_Point facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_ForceOfNature_Point)
      • Set ForceOfNature_Point = (Target point of ability being cast)
      • Unit - Create 1 Dummy Force of Nature 2 for (Owner of (Casting unit)) at ForceOfNature_Point facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_ForceOfNature_Point)
      • Wait 0.30 seconds
      • Set ForceOfNature_Point = (Target point of ability being cast)
      • Unit - Create 1 Dummy Force of Nature 4 for (Owner of (Casting unit)) at ForceOfNature_Point facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_ForceOfNature_Point)
      • Wait 0.30 seconds
      • Set ForceOfNature_Point = (Target point of ability being cast)
      • Unit - Create 1 Dummy Force of Nature 2 for (Owner of (Casting unit)) at ForceOfNature_Point facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_ForceOfNature_Point)
      • Wait 0.30 seconds
      • Set ForceOfNature_Point = (Target point of ability being cast)
      • Unit - Create 1 Dummy Force of Nature 1 for (Owner of (Casting unit)) at ForceOfNature_Point facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_ForceOfNature_Point)
      • Set ForceOfNature_Point = (Target point of ability being cast)
      • Unit - Create 1 Dummy Force of Nature 4 for (Owner of (Casting unit)) at ForceOfNature_Point facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_ForceOfNature_Point)
      • Wait 0.30 seconds
      • Set ForceOfNature_Point = (Target point of ability being cast)
      • Unit - Create 1 Dummy Force of Nature 1 for (Owner of (Casting unit)) at ForceOfNature_Point facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_ForceOfNature_Point)
      • Set ForceOfNature_Point = (Target point of ability being cast)
      • Unit - Create 1 Dummy Force of Nature 2 for (Owner of (Casting unit)) at ForceOfNature_Point facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_ForceOfNature_Point)
      • Wait 0.30 seconds
      • Set ForceOfNature_Point = (Target point of ability being cast)
      • Unit - Create 1 Dummy Force of Nature 3 for (Owner of (Casting unit)) at ForceOfNature_Point facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_ForceOfNature_Point)
      • Set ForceOfNature_Point = (Target point of ability being cast)
      • Unit - Create 1 Dummy Force of Nature 2 for (Owner of (Casting unit)) at ForceOfNature_Point facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_ForceOfNature_Point)
 
Just do it: before the first wait (in fact, THE VERY FIRST ACTION), set the variable to the point.

As you will use the same point for every dummy, you don't need to remove and set it again and again. Remove the point only in the end of the trigger.

And, just to remember again, (Target point of ability being cast) will lose its valor after waits, as well as every Event response - etc except (Triggering Unit);
 
Status
Not open for further replies.
Top