HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Not Picked?

07-10-2008, 03:49 AM#1
PenguinEmperor
Trigger:
Melee Attack
Collapse Events
Unit - 0002 <gen> Begins casting an ability
Collapse Conditions
((Ability being cast) Equal to Burning Swords (Taut)) or (((Ability being cast) Equal to Drunken Fist (Taut)) or (((Ability being cast) Equal to Lightning Shock (Taut)) or ((Ability being cast) Equal to Stone Maul (Taut))))
Collapse Actions
Trigger - Turn off (This trigger)
Animation - Play Pandaren's attack animation
Unit Group - Pick every unit in (Units within 90.00 of ((Position of Pandaren) offset by 175.00 towards (Real(DirectionDegrees)) degrees)) and do (Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - (100.00 + DamageBoost)))
Set TargetP1 = (Units within 90.00 of ((Position of Pandaren) offset by 175.00 towards (Real(DirectionDegrees)) degrees))
Sound - Play AtkSound[(Random integer number between 1 and 2)] at 100.00% volume, attached to Pandaren
Unit - Add Pain to (Picked unit)
Wait 0.97 seconds
Animation - Reset Pandaren's animation
Trigger - Turn on (This trigger)

For some reason, this DOES NOT add the ability to the units that are being harmed. Any idea why?
07-10-2008, 04:31 AM#2
Dil999
I'm rusty with gui (and WE in general) but im pretty sure that (Picked Unit) only works when you use the action "Pick every unit in (...) and do actions:"
07-10-2008, 04:42 AM#3
PenguinEmperor
I used that.
07-10-2008, 04:57 AM#4
Anopob
No, your "Add Pain to (picked unit)". It will not work because the actions are not like:
->UNIT GROUP
-> blah blah blah
-> more actions

and instead you used one line of an action. Make it actionS and it should be fine (remember to put that action under the action of the unit group, kinda confusing).

EDIT: Okay here, like this:
Trigger:
Melee Attack
Events - your event
Conditions - your condition
Collapse Actions
- other actions
Collapse Unit Group - Pick every unit in ([YOUR GROUP]) and do (Actions)
Loop - Actions
- more actions

Basically you have to put the picked unit action into that loop.
07-10-2008, 05:28 AM#5
PenguinEmperor
Okay, so I'd put the stuff that comes after "Add Pain" to where?
07-10-2008, 05:37 AM#6
Pheonix-IV
You can only use picked unit inside a unit group loop. So you need to put the add pain part in the Loop - Actions part.
07-10-2008, 05:39 AM#7
PenguinEmperor
And more action should be Do Nothing?
07-10-2008, 05:54 AM#8
Pheonix-IV
No, More Actions should be the wait and the death animation stuff.

Also, why are you turning the trigger off and then turning it back on?
07-10-2008, 06:01 AM#9
Veev
I think there are issues with setting the units life below zero. You should damage the picked units instead using the owner of the caster so he gets credit for the kills.
07-10-2008, 06:13 AM#10
Dil999
Veev is also right, you can't kill a unit by setting it's life. You should either damage it or detect if it's life will be <=0 and kill it instead.
07-10-2008, 06:32 AM#11
Gorman
for sum reason your code isnt indented, so we cant see what is inside ur loop or not.

WAIT! yeah u used the wrong unit group function.
You used the "pick units in group and do actions" insted of "Pick units in group and do MULTIPLE actions", which allows you to do what you want.

If youve figured that out then yay.
07-10-2008, 03:45 PM#12
PenguinEmperor
Quote:
Originally Posted by Dil999
Veev is also right, you can't kill a unit by setting it's life. You should either damage it or detect if it's life will be <=0 and kill it instead.


Okay, but it does infact kill stuff, do I dunno what you're talking about.
07-10-2008, 06:22 PM#13
Anitarf
When you want to deal damage, then actually dealing damage is preferable to setting unit's life. What this means is you're not using the most agreeable way to deal damage. Also, you do a lot of weird stuff in other places.

Then again, you're using GUI, so your code is not particularly agreeable either way.
07-11-2008, 01:28 AM#14
PenguinEmperor
Ah shaddup.

<__<

Worked fine until Darkwulfv told me to add blood spurts.


Doesn't work at all now.

Trigger:
Melee Attack
Collapse Events
Unit - 0002 <gen> Begins casting an ability
Collapse Conditions
((Ability being cast) Equal to Burning Swords (Taut)) or (((Ability being cast) Equal to Drunken Fist (Taut)) or (((Ability being cast) Equal to Lightning Shock (Taut)) or ((Ability being cast) Equal to Stone Maul (Taut))))
Collapse Actions
Trigger - Turn off (This trigger)
Animation - Play Pandaren's attack animation
Collapse Unit Group - Pick every unit in (Units within 90.00 of ((Position of Pandaren) offset by 175.00 towards (Real(DirectionDegrees)) degrees)) and do (Actions)
Collapse Loop - Actions
Unit - Add Hurt to (Picked unit)
Sound - Play AtkSound[(Random integer number between 1 and 2)] at 100.00% volume, attached to Pandaren
Wait 0.97 seconds
Unit - Remove Hurt from (Picked unit)
Animation - Reset Pandaren's animation
Trigger - Turn on (This trigger)
07-11-2008, 01:37 AM#15
Anopob
Once again, you need to put the picked unit under the loop, not just "Actions" of the trigger but the Unit Group - Actions.