| 05-01-2006, 11:59 AM | #1 |
i have a trigger like this it targets heros first and does actions then jumps to another hero then does more actions im having trouble with the second hero it hits Jump Events - unit casts abilitiy Conditions - Abilitiy = Jump Actions - Move caster to (target) - Damages (target)selected hero (OK THIS IS THE PROBLEM THIS IS THE SECOND PART OF THE TRIGGER) If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions - There is a hero within 900 range of(target) Then - Actions - Set that hero = (newtarget) - Move caster to (newtarget) - Damage closest hero(newtarget) with 900 range fo X amount of damage Else - Actions I'd love any help thx :) |
| 05-01-2006, 12:20 PM | #2 |
Eh.. there is no "There is a hero within 900 range of (target)" It would help if you just put the trigger as it is shown on your world editor What you need to do is Pick every unit in units around the target within X range, matching unit type of picked unit is a hero equal to true, set it on a variable and do your actions. You just posted what you would like to do. Please post the trigger. |
| 05-01-2006, 01:02 PM | #3 |
ok here is what i have of the trigger so far this works fine it deals the damage based of distance between the casting hero and the targeted hero (distancex0.35) now i want it to be able to jump to a second target (ONLY HERO) and deal the same equation (distance between 1st target/caster and 2nd target [caster is now on top of 1st target by the way]) the move instantly to point has nothing to do with the probly ill smooth it later to make it quicker moved. Flash Attack Events Unit - A unit Begins casting an ability Conditions (Ability being cast) Equal to Flash Attack Actions Set zCaster = (Casting unit) Set zTarget = (Targeted unit) Set zCasterPoint = (Position of (Casting unit)) Set zTargetPoint = (Position of (Targeted unit)) Set zDistance = (Distance between zCasterPoint and zTargetPoint) Set zAngle = (Angle from zCasterPoint to zTargetPoint) Unit - Turn collision for zCaster Off Special Effect - Create a special effect attached to the overhead of zCaster using Abilities\Spells\Human\Slow\SlowCaster.mdl Wait 0.20 seconds Unit - Move zCaster instantly to (zCasterPoint offset by (zDistance / 3.00) towards zAngle degrees), facing zTargetPoint Wait 0.20 seconds Unit - Move zCaster instantly to (zCasterPoint offset by (zDistance / 3.00) towards zAngle degrees), facing zTargetPoint Wait 0.20 seconds Unit - Move zCaster instantly to (zCasterPoint offset by (zDistance / 3.00) towards zAngle degrees), facing zTargetPoint Special Effect - Destroy (Last created special effect) Special Effect - Create a special effect at zTargetPoint using Abilities\Spells\Items\AIvi\AIviTarget.mdl Set zDummyDamageTarget = (zDistance x 0.35) Unit - Cause zCaster to damage zTarget, dealing zDummyDamageTarget damage of attack type Normal and damage type Normal This is where i want it to say if there is a unit equal to hero true within 900 range of 1st target/caster deal damage to that 2nd target(hero) based on distance between 1st hero/caster and 2nd hero(target2) If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions Then - Actions Else - Actions |
| 05-01-2006, 03:58 PM | #4 |
As stated by Vile already, you will need to set a unitgroup in range of your casting units location at that point in your trigger. Just use conditions in the group to get the unit you want. I would also change CastingUnit to TriggerUnit as to avoid problems if you get longer waits in the trigger. If you still have trouble, let me know and I may be able to type it for you. |
