TRigger Conflict

warroom99

New Member
Reaction score
15
i made 2 trigger enhanced spell

this is the first spell...

Code:
Lightning Strike
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Lightning Strike
    Actions
        Set LightningStrike = True
        Set TempPoint = (Position of (Target unit of ability being cast))
        Set TempInteger = (25 + (25 x (Level of (Ability being cast) for (Triggering unit))))
        Custom script:   set bj_wantDestroyGroup = true
        Unit Group - Pick every unit in (Units within 600.00 of TempPoint matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is alive) Equal to True)) and ((Matching unit) Not equal to (Target unit of ability being cast)))) and do (Actions)
            Loop - Actions
                Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Weapons\Bolt\BoltImpact.mdl
                Special Effect - Destroy (Last created special effect)
                Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (10.00 + (Real((5 x (Level of (Ability being cast) for (Triggering unit)))))) damage of attack type Spells and damage type Normal
                Set TempInteger = (TempInteger + (10 + (10 x (Level of (Ability being cast) for (Triggering unit)))))
        Floating Text - Create floating text that reads ((String(TempInteger)) + !) above (Target unit of ability being cast) with Z offset 0.00, using font size 11.00, color (10.00%, 25.00%, 100.00%), and 0.00% transparency
        Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
        Floating Text - Change (Last created floating text): Disable permanence
        Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds
        Floating Text - Change the fading age of (Last created floating text) to 4.00 seconds
        Custom script:   call RemoveLocation(udg_TempPoint)
        Set LightningStrike = False

here comes the problem... i added this trigger for the hero's third spell (passive)

Code:
DMG Implement
    Events
    Conditions
        (Damage taken) Greater than 0.00
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Triggering unit) is A structure) Equal to False
                (Level of Hammer Drive for (Damage source)) Greater than or equal to 1
                LightningStrike Equal to False
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        (Custom value of (Damage source)) Greater than or equal to (8 - (Level of Hammer Drive for (Damage source)))
                    Then - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                            Then - Actions
                                Set TempPoint = (Position of (Triggering unit))
                                Special Effect - Destroy HammerDrive[1]
                                Special Effect - Destroy HammerDrive[2]
                                Special Effect - Destroy HammerDrive[3]
                                Unit - Set the custom value of (Damage source) to 0
                                Unit - Create 1 Dummy for (Owner of (Damage source)) at TempPoint facing Default building facing degrees
                                Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                                Unit - Add HammerDrive to (Last created unit)
                                Unit - Order (Last created unit) to Neutral - Hurl Boulder (Triggering unit)
                                Custom script:   call RemoveLocation(udg_TempPoint)
                            Else - Actions
                                Do nothing
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                ((Custom value of (Damage source)) - (8 - (Level of Hammer Drive for (Damage source)))) Equal to -1
                            Then - Actions
                                Special Effect - Create a special effect attached to the (hand + right) of (Damage source) using Abilities\Weapons\FarseerMissile\FarseerMissile.mdl
                                Set HammerDrive[1] = (Last created special effect)
                                Special Effect - Create a special effect attached to the (hand + left) of (Damage source) using Abilities\Weapons\FarseerMissile\FarseerMissile.mdl
                                Set HammerDrive[2] = (Last created special effect)
                                Special Effect - Create a special effect attached to the chest of (Damage source) using Abilities\Spells\Orc\Purge\PurgeBuffTarget.mdl
                                Set HammerDrive[3] = (Last created special effect)
                            Else - Actions
                        Unit - Set the custom value of (Damage source) to ((Custom value of (Damage source)) + 1)
            Else - Actions

now when i cast the first spell and came to the point of damaging (unit group)

the passive skill also activates... it adds to the custom value of the unit. stunning the target...

how can i prevent this?
 
Code:
Lightning Strike
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Lightning Strike
    Actions
        Set LightningStrike = True
        Set TempPoint = (Position of (Target unit of ability being cast))
        Set TempInteger = (25 + (25 x (Level of (Ability being cast) for (Triggering unit))))
        Custom script:   set bj_wantDestroyGroup = true
        Unit Group - Pick every unit in (Units within 600.00 of TempPoint matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is alive) Equal to True)) and ((Matching unit) Not equal to (Target unit of ability being cast)))) and do (Actions)
            Loop - Actions
                Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Weapons\Bolt\BoltImpact.mdl
                Special Effect - Destroy (Last created special effect)
[B]                Trigger - Turn off DMG Implement <gen>[/B]
                Unit - Cause (Triggering unit) to damage (Target unit of ability being cast), dealing (10.00 + (Real((5 x (Level of (Ability being cast) for (Triggering unit)))))) damage of attack type Spells and damage type Normal
[B]                Trigger - Turn on DMG Implement <gen>[/B]
                Set TempInteger = (TempInteger + (10 + (10 x (Level of (Ability being cast) for (Triggering unit)))))
        Floating Text - Create floating text that reads ((String(TempInteger)) + !) above (Target unit of ability being cast) with Z offset 0.00, using font size 11.00, color (10.00%, 25.00%, 100.00%), and 0.00% transparency
        Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
        Floating Text - Change (Last created floating text): Disable permanence
        Floating Text - Change the lifespan of (Last created floating text) to 5.00 seconds
        Floating Text - Change the fading age of (Last created floating text) to 4.00 seconds
        Custom script:   call RemoveLocation(udg_TempPoint)
        Set LightningStrike = False
Add the bolded lines and this spell will not cause the damage trigger to fire, since it's not on while the unit takes damage.
 
the trigger DMG implement has plenty of other triggers for other heroes...

turning that off will cause errors on other heroes ryt?
 
This will only cause problems if another unit takes damage at exactly the same time as this spell causes the damage, since the trigger is turned back on as soon as the damage is done.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    News portal has been retired. Main page of site goes to Headline News forum now
  • The Helper The Helper:
    I am working on getting access to the old news portal under a different URL for those that would rather use that for news before we get a different news view.
  • Ghan Ghan:
    Easily done
    +1
  • The Helper The Helper:
    https://www.thehelper.net/pages/news/ is a link to the old news portal - i will integrate it into the interface somewhere when i figure it out
  • Ghan Ghan:
    Need to try something
  • Ghan Ghan:
    Hopefully this won't cause problems.
  • Ghan Ghan:
    Hmm
  • Ghan Ghan:
    I have converted the Headline News forum to an Article type forum. It will now show the top 20 threads with more detail of each thread.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top