HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Not damaging enemies, why?

02-05-2006, 12:35 AM#1
Tiki
Ok I have this spell called fissure, based off howl of terror.
But it wont damage enemys like it should.

Heres the initiating trigger.
Trigger:
Fissure
Collapse Events
Unit - A unit Begins casting an ability
Collapse Conditions
(Ability being cast) Equal to Fissure
Collapse Actions
Set Earthchanter = (Casting unit)
Camera - Shake the camera for (Owner of Earthchanter) with magnitude 15.00
Unit - Pause Earthchanter
Animation - Reset Earthchanter's animation
Trigger - Turn on Fissure Damage <gen>
Trigger - Turn on Fissure Waves <gen>
Wait (Real((Level of Fissure for Earthchanter))) seconds
Trigger - Turn off Fissure Damage <gen>
Trigger - Turn off Fissure Waves <gen>
Camera - Stop swaying/shaking the camera for (Owner of Earthchanter)
Collapse Unit Group - Pick every unit in (Units within 700.00 of (Position of Earthchanter)) and do (Actions)
Collapse Loop - Actions
Camera - Stop swaying/shaking the camera for (Owner of (Picked unit))
Unit - Set (Picked unit) movement speed to (Default movement speed of (Picked unit))
Unit - Unpause Earthchanter


Heres the trigger that should damage the enemy units for 100hp, but its not doing so.
Trigger:
Fissure Damage
Collapse Events
Time - Every 1.00 seconds of game time
Conditions
Collapse Actions
Animation - Play Earthchanter's Spell Slam animation
Sound - Play EarthquakeLoop1 <gen> at 100.00% volume, attached to Earthchanter
Collapse Destructible - Pick every destructible within 500.00 of (Position of Earthchanter) and do (Actions)
Collapse Loop - Actions
Destructible - Kill (Picked destructible)
Collapse Unit Group - Pick every unit in (Units within 700.00 of (Position of Earthchanter) matching (((Matching player) is an enemy of (Owner of Earthchanter)) Equal to True)) and do (Actions)
Collapse Loop - Actions
Camera - Shake the camera for (Owner of (Picked unit)) with magnitude 10.00
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 100.00)
Special Effect - Create a special effect attached to the origin of (Picked unit) using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
Unit - Set (Picked unit) movement speed to 100.00
Collapse Unit Group - Pick every unit in (Units in (Playable map area) matching ((Integer((Distance between (Position of (Matching unit)) and (Position of Earthchanter)))) Greater than or equal to 700)) and do (Actions)
Collapse Loop - Actions
Camera - Stop swaying/shaking the camera for (Owner of (Picked unit))
Unit - Set (Picked unit) movement speed to (Default movement speed of (Picked unit))

And the effects
Trigger:
Fissure Waves
Collapse Events
Time - Every 0.20 seconds of game time
Conditions
Collapse Actions
Set FissureDust = (FissureDust + (Random real number between 10.00 and 20.00))
Special Effect - Create a special effect at (Position of Earthchanter) using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
Special Effect - Create a special effect at (Random point in (Region centered at (Position of Earthchanter) with size (850.00, 850.00))) using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
Special Effect - Create a special effect at (Position of Earthchanter) using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
Special Effect - Create a special effect at ((Position of Earthchanter) offset by 100.00 towards FissureDust degrees) using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
Special Effect - Create a special effect at ((Position of Earthchanter) offset by 200.00 towards FissureDust degrees) using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
Special Effect - Create a special effect at ((Position of Earthchanter) offset by 300.00 towards FissureDust degrees) using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
Special Effect - Create a special effect at ((Position of Earthchanter) offset by 400.00 towards FissureDust degrees) using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
Special Effect - Create a special effect at ((Position of Earthchanter) offset by 500.00 towards FissureDust degrees) using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
Special Effect - Create a special effect at ((Position of Earthchanter) offset by 600.00 towards FissureDust degrees) using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
Special Effect - Create a special effect at ((Position of Earthchanter) offset by 700.00 towards FissureDust degrees) using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
Special Effect - Create a special effect at ((Position of Earthchanter) offset by 100.00 towards (FissureDust x -1.00) degrees) using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
Special Effect - Create a special effect at ((Position of Earthchanter) offset by 200.00 towards (FissureDust x -1.00) degrees) using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
Special Effect - Create a special effect at ((Position of Earthchanter) offset by 300.00 towards (FissureDust x -1.00) degrees) using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
Special Effect - Create a special effect at ((Position of Earthchanter) offset by 400.00 towards (FissureDust x -1.00) degrees) using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
Special Effect - Create a special effect at ((Position of Earthchanter) offset by 500.00 towards (FissureDust x -1.00) degrees) using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
Special Effect - Create a special effect at ((Position of Earthchanter) offset by 600.00 towards (FissureDust x -1.00) degrees) using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl
Special Effect - Create a special effect at ((Position of Earthchanter) offset by 700.00 towards (FissureDust x -1.00) degrees) using Objects\Spawnmodels\Undead\ImpaleTargetDust\ImpaleTargetDust.mdl

Now how can I make it damage enemies but not damage the hero or allies.
02-05-2006, 01:27 AM#2
Naakaloh
I believe the problem is this condition.

Unit Group - Pick every unit in (Units within 700.00 of (Position of Earthchanter) matching (((Matching player) is an enemy of (Owner of Earthchanter)) Equal to True)) and do (Actions)

Although off the top of my head I can't seem to think of a solution. It seems like it should be something like (owner of (matching unit)) instead.
02-05-2006, 01:46 AM#3
Ignitedstar
You might want to read the whole post before making changes, so keep reading.

In the second trigger in the first Unit Group, change the conditions into [Condition] and [Condition]. In the first condition, put in what your normally put. Then, in the second one, put [Unit is a hero Equal to False]. This way, any hero will not lose life or get slowed. If you want heroes to still get slowed, then you need to make another unit group that does the slow movement part without the condition I told you about.

In the same trigger and unit group, change the Matching Player to Matching Unit. And, I'm not sure if there is a difference, but you can change the [Owner of Earthchanter] to [Owner of Triggering Unit]. This should solve the fact that your friends and your own units are getting hurt.

Many people tell me that you should use variables to do damage. So, you should make a variable called "UnitDamage" or something and set it to "Integer". Now, in your trigger, make a trigger with "Set Variable" and put in [Unit Damage - 100].

Now, you want to change your [Unit - Set Life] to [Unit - Deal damage] and in the damaging field, put in your variable.

That MIGHT do it. I don't have WE open, but I'm pretty sure about what I just said. I hope it helps.
02-05-2006, 02:14 AM#4
Naakaloh
Quote:
Originally Posted by Ignitedstar
You might want to read the whole post before making changes, so keep reading.

Erm.. Were you talking to me? I did read the whole post... I didn't think I missed anything...

Also, I'm not sure if changing from (Casting Unit) to (Triggering Unit) will have an effect in this case, since Tiki isn't running the damage trigger in the same thread. It might actually be better to change it loop that executes it a certain number of times depending on the level instead of using periodic events.
02-05-2006, 03:19 AM#5
Ignitedstar
No, no, no! Not you! I meant Tiki. My bad for making it sound like it was referring to you. Maybe I should have said a name?
02-05-2006, 03:33 AM#6
Naakaloh
It's ok, I don't mind, I just wasn't sure who you meant and I got confused.
02-05-2006, 08:35 AM#7
Anitarf
The effect trigger leaks a bunch of locations. As for the damage not working, fix your condition the way Naakaloh suggested, you have no "matching player" in a "pick every unit" loop. Also, use the damage action rather than decreasing the life, that way you get proper bounty on kills.
02-05-2006, 08:39 AM#8
Blade.dk
And use a unit starts the effect of an ability, the other thing makes the trigger fire before mana is taken and cooldown started, so fast players can abuse it.
02-05-2006, 08:53 AM#9
harel
Tiki Wrote
Quote:
Trigger:
Unit Group - Pick every unit in (Units in (Playable map area) matching ((Integer((Distance between (Position of (Matching unit)) and (Position of Earthchanter)))) Greater than or equal to 700)) and do (Actions)
Loop - Actions
Camera - Stop swaying/shaking the camera for (Owner of (Picked unit))
Unit - Set (Picked unit) movement speed to (Default movement speed of (Picked unit))
Another problem that I see: I don’t think that you can set distance between marching unit and casting unit.
The matching unit should be A variable something like:
Trigger:
Time - Every 1.00 seconds of game time
Conditions
Actions
Set EnemyCounter = 1
Animation - Play Earthchanter's Spell Slam animation
Sound - Play EarthquakeLoop1 <gen> at 100.00% volume, attached to Earthchanter
Destructible - Pick every destructible within 500.00 of (Position of Earthchanter) and do (Actions)
Loop - Actions
Destructible - Kill (Picked destructible)
Unit Group - Pick every unit in (Units within 700.00 of (Position of Earthchanter) matching (((Matching unit) is an enemy of (Owner of Earthchanter)) Equal to True)) and do (Actions)
Loop - Actions
Camera - Shake the camera for (Owner of (Picked unit)) with magnitude 10.00
Set EnemyUnit[EnemyCounter] = (Picked unit)
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 100.00)
Special Effect - Create a special effect attached to the origin of (Picked unit) using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
Unit - Set (Picked unit) movement speed to 100.00
Set EnemyCounter = EnemyCounter + 1
And Replace the matching unit with the unit variable.
02-05-2006, 08:59 AM#10
Anitarf
Your trigger has messed up indentation, and what you're saying doesn't make much sense. Of course he can get the distance between matching and casting unit, why not?
02-05-2006, 09:03 AM#11
harel
Thanx i didnt thoght of that.
02-05-2006, 06:40 PM#12
Tiki
Hmm well would there be an easier way to write this with only one trigger, and does not interfere with other heros casting it at the same time and when the spell is interrupted the effects go away?

Cause those are some problems im having also =P
02-05-2006, 07:38 PM#13
Tiki
Well I got it to damage, but it still hurts the hero. I dont want it to hurt any allies period..

Also all my spells collide with each other, so they get messed up if u multicast em, help?

Trigger:
Fissure Damage
Collapse Events
Time - Every 1.00 seconds of game time
Conditions
Collapse Actions
Set Damage = 100.00
Animation - Play Earthchanter[1]'s Spell Slam animation
Sound - Play EarthquakeLoop1 <gen> at 100.00% volume, attached to Earthchanter[1]
Collapse Destructible - Pick every destructible within 700.00 of (Position of Earthchanter[1]) and do (Actions)
Collapse Loop - Actions
Destructible - Kill (Picked destructible)
Collapse Unit Group - Pick every unit in (Units within 700.00 of (Position of Earthchanter[1]) matching (((Picked unit) belongs to an enemy of (Owner of Earthchanter[1])) Equal to True)) and do (Actions)
Collapse Loop - Actions
Camera - Shake the camera for (Owner of (Picked unit)) with magnitude 10.00
Unit - Cause Earthchanter[1] to damage (Picked unit), dealing Damage damage of attack type Normal and damage type Normal
Special Effect - Create a special effect attached to the origin of (Picked unit) using Objects\Spawnmodels\Human\HumanBlood\BloodElfSpellThiefBlood.mdl
02-05-2006, 08:22 PM#14
Anitarf
Easy solution: make it so only one player can pick each hero. It's one of the most overused solutions to this problem, but if you're not skilled in programing, you can't be picky.

Harder solution: Allright, how many heroes of the same type do you want to have? Is one per player good enough? If so, then the solution isn't too hard: just make all the variables your spell uses into arrays, and use (player number of (owner of (triggering unit))) as the index in every trigger that runs when a spell is cast, and loop through the whole array in periodic triggers. That way, when two heroes cast the spell, each instance of the trigger will use a different array index on your variable, thus avoiding any spell trigger conflict. The periodic trigger will check all array indexes, so any ammount of players can be using the same kind of spell at the same time.
02-05-2006, 08:47 PM#15
Tiki
Ya every hero can only be chosen once, so only one player. And I used arrays like hero[1] for x spell, and hero[2] for x spell, etc. But it still gets messed up hmmm...

Also why wont my trees remove.

Trigger:
Forest Path
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Forest Path
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Level of Forest Path for (Casting unit)) Equal to 1
Collapse Then - Actions
Destructible - Create a dead Ashenvale Tree Wall at (Random point in (Region centered at (Target point of ability being cast) with size (200.00, 200.00))) facing (Random angle) with scale 1.00 and variation 5
Destructible - Create a dead Ashenvale Tree Wall at (Random point in (Region centered at (Target point of ability being cast) with size (200.00, 200.00))) facing (Random angle) with scale 0.70 and variation 0
Destructible - Create a dead Ashenvale Tree Wall at (Random point in (Region centered at (Target point of ability being cast) with size (200.00, 200.00))) facing (Random angle) with scale 0.80 and variation 1
Destructible - Create a dead Ashenvale Tree Wall at (Random point in (Region centered at (Target point of ability being cast) with size (200.00, 200.00))) facing (Random angle) with scale 1.00 and variation 0
Destructible - Create a dead Ashenvale Tree Wall at (Random point in (Region centered at (Target point of ability being cast) with size (200.00, 200.00))) facing (Random angle) with scale 0.90 and variation 2
Destructible - Create a dead Ashenvale Tree Wall at (Random point in (Region centered at (Target point of ability being cast) with size (200.00, 200.00))) facing (Random angle) with scale 0.77 and variation 3
Destructible - Create a dead Ashenvale Tree Wall at (Random point in (Region centered at (Target point of ability being cast) with size (200.00, 200.00))) facing (Random angle) with scale 1.00 and variation 4
Collapse Destructible - Pick every destructible within 200.00 of (Target point of ability being cast) and do (Actions)
Collapse Loop - Actions
Destructible - Resurrect (Picked destructible) with (Max life of (Last created destructible)) life and Show birth animation
Wait 15.00 seconds
Animation - Play (Picked destructible)'s death animation
Wait 0.75 seconds
Destructible - Remove (Picked destructible)
Collapse Else - Actions
Do nothing