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

[Trigger] Trigger DC'ing

Discussion in 'Triggers & Scripts' started by Endless_Cola, Oct 19, 2010.

  1. Endless_Cola

    Endless_Cola

    Joined:
    Oct 17, 2010
    Messages:
    3
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Hello everyone, I tested map of mine lately but found a bug. When a spell countaining this trigger was casted other player instantly disconnect's.
    Anybody here could find the proplem?

    • Flames of Death
      • Events
        • Unit - A unit Starts the effect of an ability
      • Conditions
        • (Ability being cast) Equal to Fireshatter |CFF7EBFF1R|R (Neutral Hostile)
      • Actions
        • Sound - Play Incinerate1 <gen>
        • Set UltiCaster = (Triggering unit)
        • For each (Integer A) from 1 to 72, do (Actions)
          • Loop - Actions
            • Set UltiPoint = (Position of UltiCaster)
            • Set UltiPoint2 = (UltiPoint offset by (15.00 x (Real((Integer A)))) towards (15.00 x (Real((Integer A)))) degrees)
            • Special Effect - Create a special effect at UltiPoint2 using Abilities\Spells\Other\Volcano\VolcanoDeath.mdl
            • Special Effect - Destroy (Last created special effect)
            • Unit Group - Pick every unit in (Units within 125.00 of UltiPoint2 matching (((Matching unit) belongs to an enemy of (Owner of UltiCaster)) Equal to True)) and do (Actions)
              • Loop - Actions
                • Unit Group - Add (Picked unit) to Ultigrp
                • Unit Group - Pick every unit in Ultigrp and do (Actions)
                  • Loop - Actions
                    • Unit - Cause UltiCaster to damage (Picked unit), dealing 9999.00 damage of attack type Spells and damage type Normal
                    • Unit Group - Pick every unit in Ultigrp and do (Actions)
                      • Loop - Actions
                        • Unit Group - Remove (Picked unit) from Ultigrp
                        • Custom script: call RemoveLocation( udg_UltiPoint )
                        • Custom script: call RemoveLocation( udg_UltiPoint2 )



    Here is the description of spell wich it is supposed to do if it helps.
    "Lord of the Flames channels powerfull ancient magic to summon thousands flames underground to burst out with unbelievable power creating an fiery earthquake. AoE:|R ~Unknown Effect Speed:|R Instant Casting Time:|R ~1 Sec."

    ~~Thank you in advance, Endless_Cola.
     
  2. Bond009

    Bond009

    Joined:
    Mar 24, 2010
    Messages:
    917
    Resources:
    3
    Maps:
    3
    Resources:
    3
    yeah its done all wrong. it could be all the unitgroupleaks and point leaks done 72 times

    also the setting point var's should not be done outside the loop this only needs to be done Once.

    and when you remove the point leaks and unitgroup leaks with jass do it outside the loop at the very end of the trigger.

    In fact now that i look closer at it why are you doing those unitgroup within a unitgroup inside another ALL INSIDE THE 72 LOOP?

    you dont need to Add (Picked unit) to Ultigrp 72 times + how many units u pick which mulitplies it or Unit Group - Remove (Picked unit) from Ultigrp, That you probably are doing 100s of times you have like 4-5 loops inside eachother :(

    I dont have to fix this and show you right now but god i wish i did xD lol


    Edit:
    just read what you want this trigger to even do, you dont need a trigger for this at all. just use D&D make it do 100% damage with a 1 sec cast time and give it crazy fire flames affect. Done.
     
  3. defskull

    defskull

    Joined:
    Mar 27, 2008
    Messages:
    7,978
    Resources:
    17
    Spells:
    17
    Resources:
    17
    Trigger leaks, this is the best explanation of it
    Leaks in here "For each (Integer A) from 1 to 72, do (Actions)"
     
  4. jk2pach

    jk2pach

    Joined:
    Mar 19, 2009
    Messages:
    352
    Resources:
    50
    Models:
    43
    Packs:
    1
    Maps:
    4
    Tutorials:
    2
    Resources:
    50
    An explanation of your crash is:

    1-You pick all units and wants to add them to a group (cause Pick Every Unit just add them to a global group)
    2-Each time a unit is picked, you pick every units in the other group.
    3-And then, you pick all units again to remove them from the group.

    This could cause an temporary infinite loop.
     
  5. Bond009

    Bond009

    Joined:
    Mar 24, 2010
    Messages:
    917
    Resources:
    3
    Maps:
    3
    Resources:
    3
    lol yeap and the game goes well, f that.. chrashhh
     
  6. Endless_Cola

    Endless_Cola

    Joined:
    Oct 17, 2010
    Messages:
    3
    Resources:
    1
    Maps:
    1
    Resources:
    1
    Okey..

    Uhhuh. Thanks to all of you. Still I cant get the trigger fixed properly, I would apperiacate anyone who could show me how to do it. It's supposed to create 72 points that spawn effects, and then pick unit in every one of them and kill him if hes picked, but at the moment it seems it's working fine in that way, but more like picking 72 times, killing 72 times, removing 72 times...

    EDIT : Pfft, I think im just going to redesign the spell so it's much more simplier than it's now. Thank you all from great help.
     
    Last edited: Oct 20, 2010