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

[Solved] Triggered Spell Problem

Discussion in 'Triggers & Scripts' started by TerraNexx, Nov 22, 2011.

  1. TerraNexx

    TerraNexx

    Joined:
    Dec 9, 2008
    Messages:
    230
    Resources:
    0
    Resources:
    0
    I tested this and looked into million times, but still can't find the problem here. The spell is supossed to create little flares every 0.04 seconds for 4 seconds further and further so they would form a line.

    The only time this occured is when i casted them near a creep and they walked over it.

    I just can't figure the error in this trigger, and i could use a fresh pair of eyes.

    Please help :eekani:

    • Burning Wake Cast
      • Events
        • Unit - A unit Starts the effect of an ability
      • Conditions
        • (Ability being cast) Equal to (==) Burning Wake
      • Actions
        • Set BurningWake_Angle = (Facing of (Triggering unit))
        • Set BurningWake_Caster = (Casting unit)
        • Set BurningWake_LocCaster = (Position of (Triggering unit))
        • Set BurningWake_LocStart = (BurningWake_LocCaster offset by 200.00 towards BurningWake_Angle degrees)
        • Trigger - Turn on Burning Wake <gen>
        • Point - Remove BurningWake_LocCaster
        • Start BurningWake_Timer lasting 4.00 and One-shot and execute (Trigger - Turn off Burning Wake <gen>) when it expires
          • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Remaining time for BurningWake_Timer) Equal to (==) 0.00
            • Then - Actions
              • Point - Remove BurningWake_LocStart
            • Else - Actions


    • Burning Wake
      • Events
        • Time - Every 0.04 seconds of game time
      • Conditions
      • Actions
        • Set BurningWake_LocNext = (BurningWake_LocStart offset by 7.00 towards BurningWake_Angle degrees)
        • Unit - Create 1 Sun Flare for Neutral Passive at BurningWake_LocNext facing Default building facing (270.0) degrees
        • Unit Group - Pick every unit in (Units within 180.00 of BurningWake_LocNext) and do (Actions)
          • Loop - Actions
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • ((Owner of (Picked unit)) is an enemy of (Owner of BurningWake_Caster)) Equal to (==) True
              • Then - Actions
                • Unit - Cause BurningWake_Caster to damage circular area after 0.00 seconds of radius 180.00 at BurningWake_LocNext, dealing 0.10 damage of attack type Spells and damage type Normal
                • Unit - Turn collision for (Last created unit) Off
                • Set BurningWake_LocStart = (Position of (Last created unit))
                • Special Effect - Create a special effect attached to the overhead of (Picked unit) using Environment\SmallBuildingFire\SmallBuildingFire2.mdl
                • Special Effect - Destroy (Last created special effect)
              • Else - Actions
        • Point - Remove BurningWake_LocNext
        • Wait 3.90 seconds
        • Unit Group - Pick every unit in (Units within 200.00 of BurningWake_LocStart) and do (Actions)
          • Loop - Actions
            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • (Unit-type of (Picked unit)) Equal to (==) Sun Flare
              • Then - Actions
                • Unit - Remove (Picked unit) from the game
              • Else - Actions
     
  2. Spartipilo

    Spartipilo

    Joined:
    Jul 14, 2011
    Messages:
    3,190
    Resources:
    0
    Resources:
    0
    • Trigger
      • Set BurningWake_Angle = (Facing of (Triggering unit))
      • Set BurningWake_Caster = (Casting unit)

    Are you serious? Casting Unit = Triggering Unit. They should be swaped.

    • Trigger
    • Actions
      • Set BurningWake_Caster = (Triggering Unit)
      • Set BurningWake_Angle = (Facing of BurningWake_Caster)
      • -------- Moving on --------
      • Set BurningWake_LocCaster = (Position of BurningWake_Caster)
      • Set BurningWake_LocStart = (BurningWake_LocCaster offset by 200.00 towards BurningWake_Angle degrees)
      • -------- ^^ This Leaks ^^ Points with Offset requires creates 2 points. The base position and the offset position. --------


    Also, you wait 3.90 seconds every 0.04 seconds...

    • Leaks
      • Unit Group - Pick every unit in (Units within 180.00 of BurningWake_LocNext) and do (Actions)
      • Unit Group - Pick every unit in (Units within 200.00 of BurningWake_LocStart) and do (Actions)


    Question: is it supposed to be MPI or MUI?

    Question: Is this supposed to create some kind of firewall that continuously damages unit taht comes near, or just a straight line of Fire like Lina's Fenix?

    EDIT: I'm Working on the WE to create a spell like the one you want. Never did one like this, so it's taking me a while.

    EDIT: I already have it MUI, GUI, and leakless. I just need to know if it's a firewall that remains there, or if it's just a straight line. Also, let me know how many levels the ability has, and how does the damage/range/duration increases per level.

    The screenshot shows a bit of the ability. Used some random fire model. It moves slowly (8 points each 0.05 sec) towards facing direction and burns by 2 every 0.05 sec (0.10 was actually doing nothing).
     

    Attached Files:

    • Test.jpg
      Test.jpg
      File size:
      136.2 KB
      Views:
      41
    Last edited: Nov 22, 2011
  3. TerraNexx

    TerraNexx

    Joined:
    Dec 9, 2008
    Messages:
    230
    Resources:
    0
    Resources:
    0
    Yeah i know its a lot of mess, but I was trying to get it done faster.

    No i didn't want it o be a firewall, (exactly like Lina's Fenix, but ) and it would have about 10-15 levels.

    My primary error is that these units i created never get destroyed..they were created and after the spell duration they would stay there forever.
     
  4. Spartipilo

    Spartipilo

    Joined:
    Jul 14, 2011
    Messages:
    3,190
    Resources:
    0
    Resources:
    0
    Let me know how does the ability scales per level, so I can set it up for you. I already have it.

    It was better for me to create it from scratch than fixing your trigger. It has some leaks, and there are better ways to achieve what you want. The triggers looks "Harder" but they're actually simpler :p

    Just in case you want to look the triggers

    • Melee Initialization
      • Events
        • Map initialization
      • Conditions
      • Actions
        • Hashtable - Create a hashtable
        • Set BurningWakeHash = (Last created hashtable)


    • Burning Wake
      • Events
        • Unit - A unit Starts the effect of an ability
      • Conditions
      • Actions
        • Set u = (Triggering unit)
        • Set Real1 = (Facing of u)
        • Set Point1 = (Position of u)
        • Unit - Create 1 Footman for (Triggering player) at Point1 facing Real1 degrees
        • Set u = (Last created unit)
        • -------- vv No need to pause if your dummy is a real dummy. Mine isn't. vv --------
        • Unit - Pause u
        • -------- ^^ No need to pause if your dummy is a real dummy. Mine isn't. ^^ --------
        • Custom script: set udg_i = GetHandleId(udg_u)
        • Unit Group - Add u to BurningWakeCasters
        • Hashtable - Save 4.05 as 0 of i in BurningWakeHash
        • Hashtable - Save 193.00 as 1 of i in BurningWakeHash
        • Custom script: call RemoveLocation(udg_Point1)
        • Trigger - Turn on Burning Wake Loop <gen>


    • Burning Wake Loop
      • Events
        • Time - Every 0.05 seconds of game time
      • Conditions
      • Actions
        • Unit Group - Pick every unit in BurningWakeCasters and do (Actions)
          • Loop - Actions
            • Set u = (Picked unit)
            • Custom script: set udg_i = GetHandleId(udg_u)
            • Set Real1 = ((Load 0 of i from BurningWakeHash) - 0.05)
            • Hashtable - Save Real1 as 0 of i in BurningWakeHash
            • Set Real2 = ((Load 1 of i from BurningWakeHash) + 8.00)
            • Hashtable - Save Real2 as 1 of i in BurningWakeHash
            • Set Point1 = (Position of u)
            • Set Point2 = (Point1 offset by Real2 towards (Facing of u) degrees)
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • Real1 Less than or equal to 0.00
              • Then - Actions
                • Hashtable - Clear all child hashtables of child i in BurningWakeHash
                • Unit - Remove u from the game
              • Else - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Number of units in BurningWakeCasters) Equal to 0
          • Then - Actions
            • Trigger - Turn off (This trigger)
          • Else - Actions
        • Special Effect - Create a special effect at Point2 using Environment\LargeBuildingFire\LargeBuildingFire1.mdl
        • Special Effect - Destroy (Last created special effect)
        • Custom script: set bj_wantDestroyGroup = true
        • Unit Group - Pick every unit in (Units within 180.00 of Point2 matching ((((Matching unit) belongs to an enemy of (Owner of u)) Equal to True) and (((Matching unit) is alive) Equal to True))) and do (Actions)
          • Loop - Actions
            • Special Effect - Create a special effect attached to the overhead of (Picked unit) using Environment\SmallBuildingFire\SmallBuildingFire2.mdl
            • Special Effect - Destroy (Last created special effect)
            • Unit - Cause u to damage (Picked unit), dealing 2.00 damage of attack type Spells and damage type Normal
        • Custom script: call RemoveLocation(udg_Point1)
        • Custom script: call RemoveLocation(udg_Point2)

     
  5. Squiggy

    Squiggy

    Joined:
    Mar 25, 2008
    Messages:
    2,627
    Resources:
    18
    Maps:
    2
    Spells:
    15
    Tutorials:
    1
    Resources:
    18
    You know, you could just add an expirationtimer to the units and give them locust
     
  6. TerraNexx

    TerraNexx

    Joined:
    Dec 9, 2008
    Messages:
    230
    Resources:
    0
    Resources:
    0
    O yeah expiration timer didn't think of that one -.-
    Thank you both :)