• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Trigger does not work

Status
Not open for further replies.
Level 8
Joined
Dec 1, 2010
Messages
316
  • 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)
 
Level 8
Joined
Dec 1, 2010
Messages
316
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 :/
 
Level 8
Joined
Dec 1, 2010
Messages
316
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.
 

Attachments

  • the fight for blabla.w3x
    158.6 KB · Views: 49
Level 8
Joined
Dec 1, 2010
Messages
316
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.

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.
 

Attachments

  • testmap for centaurbossfight.w3x
    20.6 KB · Views: 59
Level 37
Joined
Jul 22, 2015
Messages
3,485
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.

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.
 
Level 8
Joined
Dec 1, 2010
Messages
316
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.

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?
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
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?

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)
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
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?

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.
 
Level 8
Joined
Dec 1, 2010
Messages
316
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
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
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

All righty ! If it worked in the test map, the only cause of it not working in the real map would be you (;

Edit: Oops. I just noticed something horribly wrong with my trigger xP if you were to use multiple units, it would only damage TempUnit bahaha. Make a seperate variable that is the picked unit in the Unit Group and make the damage source damage that picked unit instead :D
 
Last edited:
Level 8
Joined
Dec 1, 2010
Messages
316
i also noticed that if i leave the 500 range while he is casting it ( so basicly anywhere in the map) i still get dmged when he is done.
this is kind of annouying but the main way to block the dmg is timing your block ability; but if you know of any way to make it do no dmg when the unit leaves the 500 range that would be great,
however right now it does work better then ever before;
i will also look if i might have installed it wrong

Edit, this was not caused by your trigger, i did something wrong aperently and it works perfectly now :p
Thank you very much for your help bro :d, seems i'l be able to continue working
 
Status
Not open for further replies.
Top