| 02-05-2006, 01:27 AM | #2 |
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 |
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 | |
Quote:
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 |
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 |
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 |
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 |
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 | |
Tiki Wrote Quote:
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 |
| 02-05-2006, 08:59 AM | #10 |
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 |
Thanx i didnt thoght of that. |
| 02-05-2006, 06:40 PM | #12 |
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, 08:22 PM | #14 |
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. |
