A way to detect Pulverize?

nabbig2

New Member
Reaction score
43
Sorry, I'm not so good with triggers. I know basic ones but yeah...I wish I knew more. I'm a slow learner in school too :D But anyway I'm trying to learn...so this is what I have but it won't work...

Code:
m 1
    Events
        Unit - A unit Is attacked
    Conditions
        (Level of Slow Poison 2 for (Attacking unit)) Greater than 0
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Triggering unit) is in PulverizeArea_Store) Equal to True
            Then - Actions
                Unit Group - Add (Triggering unit) to PulverizeArea_Store
                Trigger - Add to Take Damage Pulverize <gen> the event (Unit - (Triggering unit) Takes damage)
            Else - Actions

Code:
Take Damage Pulverize
    Events
    Conditions
        ((Triggering unit) has buff Slow Poison (PULVERIZE) (Non-stacking)) Equal to True
    Actions
        Trigger - Turn off (This trigger)
        Unit - Remove Slow Poison (PULVERIZE) (Non-stacking) buff from (Triggering unit)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Random integer number between 1 and 100) Less than or equal to 77
            Then - Actions
                Unit Group - Pick every unit in (Units within 512.00 of (Position of (Triggering unit)) matching ((((Matching unit) is A structure) Not equal to True) and (((Triggering unit) belongs to an ally of (Owner of Pulverizing_Unit)) Equal to True))) and do (Actions)
                    Loop - Actions
                        Unit - Cause Pulverizing_Unit to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
                        Special Effect - Create a special effect attached to the origin of Pulverizing_Unit using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
                        Special Effect - Destroy (Last created special effect)
            Else - Actions
                Trigger - Turn off (This trigger)
 

vypur85

Hibernate
Reaction score
803
> anyway I'm trying to learn

:) That's why I'm continuing to help. If you would have asked to upload a map, then... I may think twice :p.

Code:
Take Damage Pulverize
    Events
    Conditions
        ((Triggering unit) has buff Slow Poison (PULVERIZE) (Non-stacking)) Equal to True
    Actions
        Trigger - Turn off (This trigger)
        Unit - Remove Slow Poison (PULVERIZE) (Non-stacking) buff from (Triggering unit)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Random integer number between 1 and 100) Less than or equal to 77
            Then - Actions
                Unit Group - Pick every unit in (Units within 512.00 of (Position of (Triggering unit)) matching ((((Matching unit) is A structure) Not equal to True) and ((([B]Triggering unit[/B]) belongs to an ally of (Owner of [B]Pulverizing_Unit[/B])) Equal to [B]True[/B]))) and do (Actions)
                    Loop - Actions
                        Unit - Cause [B]Pulverizing_Unit[/B] to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
                        Special Effect - Create a special effect attached to the origin of Pulverizing_Unit using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
                        Special Effect - Destroy (Last created special effect)
            Else - Actions
        [B]Trigger - Turn ON (This trigger)[/B] <-- [I]Turn ON! Outside the loop and if then else statement.[/I]

Where does Pulverizing_Unit come from? Change it to 'Damage source'.

Notice the bolded parts? Change the bolded 'True' to False. Change the bolded 'Triggering unit' to Matching unit. It should work fine after that I think.
 

nabbig2

New Member
Reaction score
43
Code:
Take Damage Pulverize
    Events
    Conditions
        ((Triggering unit) has buff Slow Poison (PULVERIZE) (Non-stacking)) Equal to True
    Actions
        Trigger - Turn off (This trigger)
        Unit - Remove Slow Poison (PULVERIZE) (Non-stacking) buff from (Triggering unit)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Random integer number between 1 and 100) Less than or equal to 77
            Then - Actions
                Unit Group - Pick every unit in (Units within 512.00 of (Position of (Triggering unit)) matching ((((Matching unit) is A structure) Not equal to True) and (((Matching unit) belongs to an ally of (Owner of (Damage source))) Not equal to True))) and do (Actions)
                    Loop - Actions
                        Unit - Cause (Damage source) to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
                        Special Effect - Create a special effect attached to the origin of Pulverizing_Unit using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
                        Special Effect - Destroy (Last created special effect)
            Else - Actions
        Trigger - Turn on (This trigger)

Like this?....won't work still.
 

vypur85

Hibernate
Reaction score
803
Code:
Special Effect - Create a special effect attached to the origin of [B]Pulverizing_Unit[/B] using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
Change to 'Picked unit'.


Code:
(Matching unit) belongs to an ally of (Owner of (Damage source))) Not equal to True)
Try to use (Matching unit) belongs to an enemy of (Owner of (Damage Source)) Equal to True.


Code:
m 1
    Events
        Unit - A unit Is attacked
    Conditions
        (Level of Slow Poison 2 for (Attacking unit)) Greater than 0
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Triggering unit) is in PulverizeArea_Store) Equal to [B]True[/B]
            Then - Actions
                Unit Group - Add (Triggering unit) to PulverizeArea_Store
                Trigger - Add to Take Damage Pulverize <gen> the event (Unit - (Triggering unit) Takes damage)
            Else - Actions
The bolded above should be 'False'.


Hope it works after this...
 

nabbig2

New Member
Reaction score
43
Nope......

Code:
m 1
    Events
        Unit - A unit Is attacked
    Conditions
        (Level of Slow Poison 2 for (Attacking unit)) Greater than 0
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Triggering unit) is in PulverizeArea_Store) Not equal to True
            Then - Actions
                Unit Group - Add (Triggering unit) to PulverizeArea_Store
                Trigger - Add to Take Damage Pulverize <gen> the event (Unit - (Triggering unit) Takes damage)
            Else - Actions

Code:
Take Damage Pulverize
    Events
    Conditions
        ((Triggering unit) has buff Slow Poison (PULVERIZE) (Non-stacking)) Equal to True
    Actions
        Trigger - Turn off (This trigger)
        Unit - Remove Slow Poison (PULVERIZE) (Non-stacking) buff from (Triggering unit)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Random integer number between 1 and 100) Less than or equal to 77
            Then - Actions
                Unit Group - Pick every unit in (Units within 512.00 of (Position of (Triggering unit)) matching ((((Matching unit) is A structure) Not equal to True) and (((Matching unit) belongs to an enemy of (Owner of (Damage source))) Equal to True))) and do (Actions)
                    Loop - Actions
                        Unit - Cause (Damage source) to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
                        Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
                        Special Effect - Destroy (Last created special effect)
            Else - Actions
                Trigger - Turn on (This trigger)
 

Draphoelix

It's not the wintercold that's killing me
Reaction score
132
Trigger - Turn off (This trigger)

You turned off it at start?
I don't get the trigger.. Why do you turn it off at start?
 

vypur85

Hibernate
Reaction score
803
Code:
Take Damage Pulverize
    Events
    Conditions
        ((Triggering unit) has buff Slow Poison (PULVERIZE) (Non-stacking)) Equal to True
    Actions
        Trigger - Turn off (This trigger)
        Unit - Remove Slow Poison (PULVERIZE) (Non-stacking) buff from (Triggering unit)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Random integer number between 1 and 100) Less than or equal to 77
            Then - Actions
                Unit Group - Pick every unit in (Units within 512.00 of (Position of (Triggering unit)) matching ((((Matching unit) is A structure) Not equal to True) and (((Matching unit) belongs to an enemy of (Owner of (Damage source))) Equal to True))) and do (Actions)
                    Loop - Actions
                        Unit - Cause (Damage source) to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
                        Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
                        Special Effect - Destroy (Last created special effect)
            Else - Actions
                [B]Trigger - Turn on (This trigger)[/B]

The Turn on trigger is inside the damn loop again...! Take it out. It should be outside the loop and if then else statement.


> You turned off it at start?

Because if you don't turn it off in the beginning (which means before the damage is carried out), there's a possible infinite loop. Everytime the unit is damaged the trigger will run again. Though there's condition that the unit must have buff, but it's for precaution.


Edit:
Anyway, the trigger is untested. No one knows if it really works or not :p >.<
 

nabbig2

New Member
Reaction score
43
Code:
Take Damage Pulverize
    Events
    Conditions
        ((Triggering unit) has buff Slow Poison (PULVERIZE) (Non-stacking)) Equal to True
    Actions
        Trigger - Turn off (This trigger)
        Unit - Remove Slow Poison (PULVERIZE) (Non-stacking) buff from (Triggering unit)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Random integer number between 1 and 100) Less than or equal to 77
            Then - Actions
                Unit Group - Pick every unit in (Units within 512.00 of (Position of (Triggering unit)) matching ((((Matching unit) is A structure) Not equal to True) and (((Matching unit) belongs to an enemy of (Owner of (Damage source))) Equal to True))) and do (Actions)
                    Loop - Actions
                        Unit - Cause (Damage source) to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
                        Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
                        Special Effect - Destroy (Last created special effect)
            Else - Actions
                [B]Trigger - Turn on (This trigger)[/B]

The Turn on trigger is inside the damn loop again...! Take it out. It should be outside the loop and if then else statement.


> You turned off it at start?

Because if you don't turn it off in the beginning (which means before the damage is carried out), there's a possible infinite loop. Everytime the unit is damaged the trigger will run again. Though there's condition that the unit must have buff, but it's for precaution.

Damnit, I keep trying but I can't change it? Where should I drag it to?
 

vypur85

Hibernate
Reaction score
803
Lol... Keep trying? Use your creativity. Drag or copy and paste or anything you can think off. Delete it and create a new turn on action. You did that before right?

> Where should I drag it to?

To the most outside part of the action. Parallel to the 'Turn off trigger'.


Edit:
Exactly like Draph did below. Same goes for the special effect thing.

Edit2:
Wtf... Isn't that my trigger? Lol...

Edit3:
> before the effects is being triggered it's already being triggered off
It will still run the remaining actions.
 

Draphoelix

It's not the wintercold that's killing me
Reaction score
132
Code:
Take Damage
    Events
    Conditions
        ((Triggering unit) has buff Acid Bomb) Equal to True
    Actions
        Trigger - Turn off (This trigger)
        Unit - Remove Acid Bomb buff from (Triggering unit)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Random integer number between 1 and 100) Less than or equal to (10 x (Level of Pulverize for (Damage source)))
            Then - Actions
                Unit Group - Pick every unit in (Units within 300.00 of (Position of (Triggering unit)) matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) belongs to an enemy of (Owner of (Damage source))) Equal to True) and (((Matching unit) is alive) Equal to True)))) and do (Actions)
                    Loop - Actions
                        Unit - Cause (Damage source) to damage (Picked unit), dealing 500.00 damage of attack type Spells and damage type Normal
                Special Effect - Create a special effect attached to the origin of (Damage source) using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
                Special Effect - Destroy (Last created special effect)
            Else - Actions
        Trigger - Turn on (This trigger)

Is it supposed to be turned off and later be turned on later in the code? (The code seems right) But Nothing will happen, cause before the effects is being triggered it's already being triggered off. And when the trigger is off the actions will never reach the Turn on at the end.
 

nabbig2

New Member
Reaction score
43
I'm not sure...is anyone else on the forums who would know how to get this darn trigger to work? I've been trying for days :banghead:
 

THE_X

New Member
Reaction score
49
im not gonna try to be rude or anything but maby you should try playing around with stuff 1st like smaller triggers some normal events with no eye candy effects just only the main outcome of w/e your trigger does perhaps even take out some stuff 1st because this really should not be a big problem.
 

nabbig2

New Member
Reaction score
43
Well, this isn't my first trigger at all or anything, I've made quite a few triggers. But I think I'm just going to use the Unit is Attacked function for this; I have used it before. You are right this is wasting too much time, and I'm sick of this.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top