1. Find your way through the deepest dungeon in the 18th Mini Mapping Contest Poll.
    Dismiss Notice
  2. A brave new world lies beyond the seven seas. Join the 34th Modeling Contest today!
    Dismiss Notice
  3. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
Hive 3 Remoosed BETA - NOW LIVE. Go check it out at BETA Hive Workshop! Post your feedback in this new forum BETA Feedback.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Trigger does not work

Discussion in 'Triggers & Scripts' started by vlekje5, Aug 27, 2015.

  1. vlekje5

    vlekje5

    Joined:
    Dec 1, 2010
    Messages:
    255
    Resources:
    0
    Resources:
    0
    • DMG AREA
      • Events
        • Unit - A unit comes within 500.00 of Cairne Bloodhoof 0113 <gen>
      • Conditions
        • (Triggering unit) Equal to Chen Stormstout 0150 <gen>
      • Actions
        • Unit - Cause Cairne Bloodhoof 0113 <gen> to damage Chen Stormstout 0150 <gen>, dealing 300.00 damage of attack type Spells and damage type Normal
        • Trigger - Turn off (This trigger)



    So this is part of a bossfight in my map, but somehow chen stormstout does not take any dmg when he walks within range of cairne.
    can't seem to find out why this is.
    (as some of you might have noticed with all my questions here lately, i'm really inexperienced and this is my first serious project so sorry for all these questions)
     
  2. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,549
    Resources:
    23
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    5
    JASS:
    3
    Resources:
    23
    Moved to Triggers&Scripts.
    Print a message in your trigger to see if it actually fires.
     
  3. vlekje5

    vlekje5

    Joined:
    Dec 1, 2010
    Messages:
    255
    Resources:
    0
    Resources:
    0
    did as you said, when i come close to the cairne text is readable, but i don't take any dmg
     
  4. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,549
    Resources:
    23
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    5
    JASS:
    3
    Resources:
    23
    Is the unit maybe kind of immune?
     
  5. vlekje5

    vlekje5

    Joined:
    Dec 1, 2010
    Messages:
    255
    Resources:
    0
    Resources:
    0
    doesnt seem to be the case, does take dmg from cairnes auto attacks,
    however theres a channel part to the trigger wich is this, though i think i didn't link those for testing it;..
    • First spell
      • Events
        • Unit - Cairne Bloodhoof 0113 <gen>'s life becomes Less than (Random real number between 1400.00 and 1700.00)
      • Conditions
      • Actions
        • Unit - Pause centaurBoss
        • Animation - Play centaurBoss's channel animation
        • Special Effect - Create a special effect at (Position of centaurBoss) using Abilities\Spells\Orc\Voodoo\VoodooAura.mdl
        • Set Channel = (Last created special effect)
        • Trigger - Run Untitled Trigger 005 <gen> (ignoring conditions)
        • Wait 3.00 seconds
        • Unit - Unpause centaurBoss
        • Trigger - Turn on DMG AREA <gen>
        • Special Effect - Destroy Channel
        • Special Effect - Create a special effect at ((Position of centaurBoss) offset by 500.00 towards 0.00 degrees) using Abilities\Spells\Orc\SpikeBarrier\SpikeBarrier.mdl
        • Set spikes[1] = (Last created special effect)
        • Special Effect - Create a special effect at ((Position of centaurBoss) offset by 500.00 towards 40.00 degrees) using Abilities\Spells\Orc\SpikeBarrier\SpikeBarrier.mdl
        • Set spikes[2] = (Last created special effect)
        • Special Effect - Create a special effect at ((Position of centaurBoss) offset by 500.00 towards 80.00 degrees) using Abilities\Spells\Orc\SpikeBarrier\SpikeBarrier.mdl
        • Set spikes[3] = (Last created special effect)
        • Special Effect - Create a special effect at ((Position of centaurBoss) offset by 500.00 towards 120.00 degrees) using Abilities\Spells\Orc\SpikeBarrier\SpikeBarrier.mdl
        • Set spikes[4] = (Last created special effect)
        • Special Effect - Create a special effect at ((Position of centaurBoss) offset by 500.00 towards 160.00 degrees) using Abilities\Spells\Orc\SpikeBarrier\SpikeBarrier.mdl
        • Set spikes[5] = (Last created special effect)
        • Special Effect - Create a special effect at ((Position of centaurBoss) offset by 500.00 towards 200.00 degrees) using Abilities\Spells\Orc\SpikeBarrier\SpikeBarrier.mdl
        • Set spikes[6] = (Last created special effect)
        • Special Effect - Create a special effect at ((Position of centaurBoss) offset by 500.00 towards 240.00 degrees) using Abilities\Spells\Orc\SpikeBarrier\SpikeBarrier.mdl
        • Set spikes[7] = (Last created special effect)
        • Special Effect - Create a special effect at ((Position of centaurBoss) offset by 500.00 towards 280.00 degrees) using Abilities\Spells\Orc\SpikeBarrier\SpikeBarrier.mdl
        • Set spikes[8] = (Last created special effect)
        • Special Effect - Create a special effect at ((Position of centaurBoss) offset by 500.00 towards 320.00 degrees) using Abilities\Spells\Orc\SpikeBarrier\SpikeBarrier.mdl
        • Set spikes[9] = (Last created special effect)
        • Special Effect - Create a special effect at ((Position of centaurBoss) offset by 500.00 towards 360.00 degrees) using Abilities\Spells\Orc\SpikeBarrier\SpikeBarrier.mdl
        • Set spikes[10] = (Last created special effect)
        • Animation - Play centaurBoss's Spell slam animation
        • Wait 0.50 seconds
        • Special Effect - Destroy spikes[1]
        • Special Effect - Destroy spikes[2]
        • Special Effect - Destroy spikes[3]
        • Special Effect - Destroy spikes[4]
        • Special Effect - Destroy spikes[5]
        • Special Effect - Destroy spikes[6]
        • Special Effect - Destroy spikes[7]
        • Special Effect - Destroy spikes[8]
        • Special Effect - Destroy spikes[9]
        • Special Effect - Destroy spikes[10]

    i can post the map here if it helps :/
     
  6. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,549
    Resources:
    23
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    5
    JASS:
    3
    Resources:
    23
    What is this? If you turn this trigger off, does it work?
     
  7. vlekje5

    vlekje5

    Joined:
    Dec 1, 2010
    Messages:
    255
    Resources:
    0
    Resources:
    0
    it seems to work now, when the other trigger is put off.
     
  8. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,549
    Resources:
    23
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    5
    JASS:
    3
    Resources:
    23
    is centauerBoss a new unit? What is " Run Untitled Trigger 005 <gen>"?
     
  9. vlekje5

    vlekje5

    Joined:
    Dec 1, 2010
    Messages:
    255
    Resources:
    0
    Resources:
    0
    added the map, if you want to take a look yourself,
    centaurboss is cairne (set via variable)
    red boss is chen stormstoud (set via variable)
    i used the ingame units instead of the variables to look if that worked since using the variables for them didnt work eighter.

    as for trigger 005 it only creates floating text after a each second as a countdown to when the boss uses its skill.
     

    Attached Files:

  10. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,549
    Resources:
    23
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    5
    JASS:
    3
    Resources:
    23
    What to do? Create a test map (copy it), and remove all not needed stuff.
     
  11. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,504
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    The damage is working perfectly fine. The attack type is Spell and Chen Stormstout has Hero type armor, which means he will take reduced damage.
     
  12. vlekje5

    vlekje5

    Joined:
    Dec 1, 2010
    Messages:
    255
    Resources:
    0
    Resources:
    0
    when i test it he takes no dmg at some points
     
  13. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,504
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    I just tested it 8 times and Chen took damage every single time. Make sure he's actually walking into the range, and that you're not placing him close to Cairne in the editor.
     
  14. vlekje5

    vlekje5

    Joined:
    Dec 1, 2010
    Messages:
    255
    Resources:
    0
    Resources:
    0
    yeah, but the trigger isn't completely enabled in that map, normally the dmg when in area trigger is off and enabled by the trigger that makes for the rest of the spell,
    as requested i now made a testmap without the unneeded triggers in the way.
     

    Attached Files:

  15. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,504
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    Well then that could be the source of the problem. Under the assumption that Chen is the one doing the damage, that means he is already within the range of Cairne. The event function call is only going to work if Chen ENTERS the range, not if he is currently in range.
     
  16. vlekje5

    vlekje5

    Joined:
    Dec 1, 2010
    Messages:
    255
    Resources:
    0
    Resources:
    0
    hmm, so is there a way i can work around it with it to make it working as i intended when he is actually in cairnes range?
     
  17. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,504
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    Instead of turning on a seperate trigger that deals damage, you can just do something like this.

    • Set TempUnit = Chen
    • Set TempLoc = (Position of TempUnit)
    • Set TempGroup = (Units within 500.00 of TempLoc)
    • Unit Group - Pick every unit in TempGroup and do (Actions)
      • Loop - Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (TempUnit belongs to an enemy of Cairne) Equal to True
            • ~~any other conditions~~
          • Then - Actions
            • Unit - Cause Cairne to damage TempUnit, dealing 500.00 damage of attack type Spells and damage type Normal
          • Else - Actions
    • Custom script: call RemoveLocation (udg_TempLoc)
    • Custom script: call DestroyGroup (udg_TempGroup)
     
  18. vlekje5

    vlekje5

    Joined:
    Dec 1, 2010
    Messages:
    255
    Resources:
    0
    Resources:
    0
    so basicly will it work if i copy this excactly as it is here and make variables tempunit temploc and tempgroup?
    and then put where i usually would run the seperate trigger?
     
  19. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,504
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    Yes it will work. Just keep note that with the current conditions I have put down in the example, it will only damage units who are enemies to Cairne.
     
  20. vlekje5

    vlekje5

    Joined:
    Dec 1, 2010
    Messages:
    255
    Resources:
    0
    Resources:
    0
    thats good, i'm making a singleplayer champaign with only one hero so didnt find it necesairy to look for a way to make it work on only enamie units, but its actually better like that lol, might at somepoint add custom units.
    Seems to be working fine right now, though i'm going to put it in the real map now and test it for the last time