HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Spell problems

04-26-2008, 05:55 AM#1
dabest2503
Trigger:
Vacuum
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Vacuum (arcane wizard)
Collapse Actions
Else - Actions
Unit - Create 1 Dummy Caster for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
Unit - Add Vacuum Damage to (Last created unit)
Unit - Set level of Vacuum Damage for (Last created unit) to (Level of Vacuum (arcane wizard) for (Casting unit))
Unit - Order (Last created unit) to Night Elf Warden - Fan Of Knives
Unit - Hide (Last created unit)
Unit - Create 1 Dummy Caster for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
Unit - Add Vacuum Pull to (Last created unit)
Unit - Set level of Vacuum Pull for (Last created unit) to (Level of Vacuum (arcane wizard) for (Casting unit))
Unit - Order (Last created unit) to Special - Dark Summoning (Position of (Casting unit))
Unit - Hide (Last created unit)

Basically, this spell is supposed to pull nearby enemy units towards you and deal damage to them.

Vacuum Pull is a spell based off Dark Summoning. I changed targets allowed to Air, Enemy, Ground, Neutral and Ward. But it still doesn't do anything at all, not even teleporting friendly units.

Then I tried this.
Vacuum
Trigger:
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Vacuum (arcane wizard)
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Level of Vacuum (arcane wizard) for (Casting unit)) Equal to 1
Collapse Then - Actions
Collapse Unit Group - Pick every unit in (Units within 500.00 of (Position of (Casting unit))) and do (Actions)
Collapse Loop - Actions
Unit - Move (Picked unit) instantly to (Position of (Casting unit))
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Level of Vacuum (arcane wizard) for (Casting unit)) Equal to 2
Collapse Then - Actions
Collapse Unit Group - Pick every unit in (Units within 600.00 of (Position of (Casting unit))) and do (Actions)
Collapse Loop - Actions
Unit - Move (Picked unit) instantly to (Position of (Casting unit))
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Level of Vacuum (arcane wizard) for (Casting unit)) Equal to 3
Collapse Then - Actions
Collapse Unit Group - Pick every unit in (Units within 700.00 of (Position of (Casting unit))) and do (Actions)
Collapse Loop - Actions
Unit - Move (Picked unit) instantly to (Position of (Casting unit))
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Level of Vacuum (arcane wizard) for (Casting unit)) Equal to 4
Collapse Then - Actions
Collapse Unit Group - Pick every unit in (Units within 800.00 of (Position of (Casting unit))) and do (Actions)
Collapse Loop - Actions
Unit - Move (Picked unit) instantly to (Position of (Casting unit))
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Level of Vacuum (arcane wizard) for (Casting unit)) Equal to 5
Collapse Then - Actions
Collapse Unit Group - Pick every unit in (Units within 900.00 of (Position of (Casting unit))) and do (Actions)
Collapse Loop - Actions
Unit - Move (Picked unit) instantly to (Position of (Casting unit))
Else - Actions
Unit - Create 1 Dummy Caster for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
Unit - Add Vacuum Damage to (Last created unit)
Unit - Set level of Vacuum Damage for (Last created unit) to (Level of Vacuum (arcane wizard) for (Casting unit))
Unit - Order (Last created unit) to Night Elf Warden - Fan Of Knives
Unit - Hide (Last created unit)

It does move units instantly to the casting unit, but it also moves structures. How can I make it so that it doesnt move structures?

If there is a way to make dark summoning target enemy units, I will be glad to use the above trigger.
04-26-2008, 06:39 AM#2
Tide-Arc Ephemera
Quote:
Originally Posted by dabest2503
If there is a way to make dark summoning target enemy units, I will be glad to use the above trigger.

Well... that's hardcoded. As far as I know, it can't be changed.
04-26-2008, 07:07 AM#3
marven15
Why don't you classify the types of unit that can be pulled up? Like only pick units that are not Structure types.
04-26-2008, 07:19 AM#4
Spec
Quote:
It does move units instantly to the casting unit, but it also moves structures. How can I make it so that it doesnt move structures?
You should add check:
Trigger:
If - Conditions
((Picked Unit) is Structure) equal to No

By the way, you can greatly reduce you code, because radius have math dependence on spell's level. Look:
Trigger:
Collapse Unit Group - Pick every unit in (Units within (400.00 + Real(Level of Vacuum (arcane wizard) for (Casting Unit)) x 100.00)) of (Position of (Casting unit))) and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Picked Unit) is Structure) equal to No
Collapse Then - Actions
Unit - Move (Picked unit) instantly to (Position of (Casting unit))
Else - Actions
Unit - Create 1 Dummy Caster for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
Unit - Add Vacuum Damage to (Last created unit)
Unit - Set level of Vacuum Damage for (Last created unit) to (Level of Vacuum (arcane wizard) for (Casting unit))
Unit - Order (Last created unit) to Night Elf Warden - Fan Of Knives
Unit - Hide (Last created unit)
Unit - Add a 2 second General expiration timer to (Last created unit)

Also, I'd to add check for magic immune units (and, probably, dead units)
04-26-2008, 09:40 AM#5
marven15
Quote:
Originally Posted by Spec
You should add check:
Trigger:
If - Conditions
((Picked Unit) is Structure) equal to No

By the way, you can greatly reduce you code, because radius have math dependence on spell's level. Look:
Trigger:
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Picked Unit) is Structure) equal to No
Collapse Then - Actions
Collapse Unit Group - Pick every unit in (Units within (400.00 + Real(Level of Vacuum (arcane wizard) for (Casting Unit)) x 100.00)) of (Position of (Casting unit))) and do (Actions)
Collapse Loop - Actions
Unit - Move (Picked unit) instantly to (Position of (Casting unit))
Else - Actions
Unit - Create 1 Dummy Caster for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
Unit - Add Vacuum Damage to (Last created unit)
Unit - Set level of Vacuum Damage for (Last created unit) to (Level of Vacuum (arcane wizard) for (Casting unit))
Unit - Order (Last created unit) to Night Elf Warden - Fan Of Knives
Unit - Hide (Last created unit)

Also, I'd to add check for magic immune units (and, probably, dead units)

Yup that's the correct trigger.
04-26-2008, 11:47 AM#6
Tide-Arc Ephemera
Quote:
Originally Posted by Spec
By the way, you can greatly reduce you code, because radius have math dependence on spell's level. Look:
Trigger:
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Picked Unit) is Structure) equal to No
Collapse Then - Actions
Collapse Unit Group - Pick every unit in (Units within (400.00 + Real(Level of Vacuum (arcane wizard) for (Casting Unit)) x 100.00)) of (Position of (Casting unit))) and do (Actions)
Collapse Loop - Actions
Unit - Move (Picked unit) instantly to (Position of (Casting unit))
Else - Actions
Unit - Create 1 Dummy Caster for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
Unit - Add Vacuum Damage to (Last created unit)
Unit - Set level of Vacuum Damage for (Last created unit) to (Level of Vacuum (arcane wizard) for (Casting unit))
Unit - Order (Last created unit) to Night Elf Warden - Fan Of Knives
Unit - Hide (Last created unit)

Also, I'd to add check for magic immune units (and, probably, dead units)
That wouldn't work properly, you'd need to pick every unit and then have the actions set inside. It reads up to down, not in and then check everything around it.

You'd run the unit check loop (pick all units and do actions (multiple)), run the conditions inside it (If/Then/Else).
04-26-2008, 11:59 AM#7
Spec
Damn, I placed condition in a wrong place >_< . +1, Ephemera, +1
Trigger:
Unit Group - Pick every unit in (Units within (400.00 + Real(Level of Vacuum (arcane wizard) for (Casting Unit)) x 100.00)) of (Position of (Casting unit))) and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Picked Unit) is Structure) equal to No
Collapse Then - Actions
Unit - Move (Picked unit) instantly to (Position of (Casting unit))
Else - Actions
And one more action recommended for adding (in the end):
Trigger:
Unit - Add a 2 second General expiration timer to (Last created unit)
04-26-2008, 12:22 PM#8
marven15
Lolz I'm so stupid... I didn't noticed that... -_-
04-27-2008, 10:57 AM#9
dabest2503
How can I make it so that it won't move Invulnerable units too?

I tried using Magic Immune but it still moves Invulnerable units and doesn't move magic immune units..
04-27-2008, 11:23 AM#10
Tide-Arc Ephemera
I think there's a comparison along the lines of "Is Unit Vulnerable" or something.
04-29-2008, 05:14 AM#11
dabest2503
Quote:
Originally Posted by Tide-Arc Ephemera
I think there's a comparison along the lines of "Is Unit Vulnerable" or something.

No, there isn't. Unless I must be looking at the wrong place..
04-29-2008, 07:13 AM#12
Spec
It's nonstandard check, located in Integer comparison category:
Trigger:
If - Conditions
(Level of Invulnerable (neutral) for (Picked unit)) equal to 0
Read it as "if picked unit is vulnerable".
This should work properly.