HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

[Question] How do I do something as simple as...

11-25-2007, 01:57 AM#1
Tide-Arc Ephemera
making a channeled ability a passive ability. A strange on-attack thingy.

What I want is to be able to cast a channeling ability upon attack WITHOUT showing THAT ability's icon. For example, I want to be able to cast Cloud on attack but the only display on the command card should be a passive dummy icon. I just want to use the actual ability on attack whilst only showing a dummy icon.

I have tried doing the disabled spell book trick and detecting when a particular kind of unit attacks but it doesn't work. I THOUGHT it would work. Thought being the keyword...

GUI or JASS solutions are fine, but for this one I'd really rather JASS. [i]I'm willing to learn.

Suggestions?
11-25-2007, 03:23 AM#2
Malf
So you want your hero to cast the spell when he attacks or a dummy?

If you want your hero then:

- Use an attack detection engine
- Make sure your hero has a spellbook ability. We will call that spellbook SB1.
- Make another spellbook ability, we will call that SB2.
- Create the spell you want to channel and make sure SB2 has it on its spell list.
- Disable SB1 initially.
- Detect when a unit is attacked, condition should be Attacking Unit's Level Of YourAbility >= 1 (YourAbility should be passive btw!)
- Add SB2
- Order
- Remove when necessary

For dummies just create them and make them cast :P
11-25-2007, 03:28 AM#3
Tide-Arc Ephemera
Um, what I need is the unit/hero to do this. Also I don't understand how that would work since it looks like a more sophisticated version of what I did... please explain. It would be appreciated.
11-25-2007, 03:40 AM#4
Malf
Oh shit, I totally forgot about this:
Quote:
Originally Posted by The Warcraft III Ability Guide
Active abilities in spellbooks can't be used from triggers it seems.

All you need to do now is just add the spell(no spellbooks required :P) you want the hero to cast, order the unit to cast it and disable it. It won't stop channeling and it will be hidden.

Just to be safe, make it use a black icon so it won't get noticed too much.
11-25-2007, 03:58 AM#5
Tide-Arc Ephemera
So... the moment the unit attacks...

1. Add the ability
2. Cast the ability
3. Disable the ability
4. (upon finish casting) Remove the ability
5. Re enable the ability

Would that work? If so, I'll test it a little later.
11-25-2007, 06:11 AM#6
zen87
why don't you just use dummy unit to cast the spell ?

If you want to do some OnAttack system that returns to the attacker instead of the dummy you'll need to do some attachment to the dummy that returns to the original caster, so basically u can do a longer link, something like

hero attack -> dummy cast spell -> some unit is damaged

*on your damage detect sys
so some unit is damaged -> (is damager dummy_id?) -> if yes -> check the dummy reference and return to the caster
11-25-2007, 06:16 AM#7
Tide-Arc Ephemera
I hope you read the first post because I need a CHANNELING ability.
11-25-2007, 06:19 AM#8
Pyrogasm
Your above mentioned method should work, Tide-Arc Ephemera.
11-25-2007, 06:42 AM#9
zen87
Quote:
Originally Posted by Tide-Arc Ephemera
I hope you read the first post because I need a CHANNELING ability.
uhuh... so you want to channel a spell upon attack? sorry my bad... but yea... your method above should work
11-25-2007, 06:45 AM#10
Tide-Arc Ephemera
It works but there is still a mild trace of the interface... I used Textures\Black32.blp and here's the trigger I'm using. It works perfectly, except the green glow exists as long as the ability is being channeled.

Anyway, if anyone else wants a quick reference of what I did in case they want to do it in future...

Trigger:
AT Root Snare
Collapse Events
Unit - A unit Is attacked
Collapse Conditions
(Unit-type of (Attacking unit)) Equal to (==) Rootkin
Collapse Actions
Player - Enable Root Snare (DUMMY) for (Owner of (Triggering unit))
Unit - Add Root Snare (DUMMY) to (Attacking unit)
Unit - Order (Attacking unit) to Human Dragonhawk Rider - Aerial Shackles (Attacked unit)
Player - Disable Root Snare (DUMMY) for (Owner of (Triggering unit))

Trigger:
AT Root Snare P2
Collapse Events
Unit - A unit Finishes casting an ability
Collapse Conditions
(Ability being cast) Equal to (==) Root Snare (DUMMY)
Collapse Actions
Unit - Remove Root Snare (DUMMY) from (Triggering unit)

EDIT: Don't try this.
Trigger:
AT Root Snare
Collapse Events
Unit - A unit Is attacked
Collapse Conditions
(Unit-type of (Attacking unit)) Equal to (==) Rootkin
Collapse Actions
Player - Enable Root Snare (DUMMY) for (Owner of (Triggering unit))
Unit - Order (Attacking unit) to Human Dragonhawk Rider - Aerial Shackles (Attacked unit)
Player - Disable Root Snare (DUMMY) for (Owner of (Triggering unit))
___

EDIT
+Rep to Pyrogasm and Malf (is that the Spell Thread duo?)

EDIT!
It says I love Pyrogasm too much
11-25-2007, 07:18 AM#11
Malf
Quote:
Originally Posted by Me
All you need to do now is just add the spell(no spellbooks required :P) you want the hero to cast, order the unit to cast it and disable it. It won't stop channeling and it will be hidden.

Just to be safe, make it use a black icon so it won't get noticed too much.

Works.
11-25-2007, 07:20 AM#12
Tide-Arc Ephemera
Take a look at the second method!
11-25-2007, 07:23 AM#13
Malf
o.O I didn't see those posts when I was replying :/
11-25-2007, 07:36 AM#14
Pyrogasm
I feel so left out. (///.–)
11-25-2007, 07:46 AM#15
Tide-Arc Ephemera
QUICK NOTE
The second method I posted does not work... I just tested it, and it doesn't work.
_____

QUICK EDIT!
This is retarded, it doesn't work with non-channeling abilities and I need it to be compatible with them, too.
Trigger:
AT Seed Burst
Collapse Events
Unit - A unit Is attacked
Collapse Conditions
(Unit-type of (Attacking unit)) Equal to (==) Forest Elder
Collapse Actions
Player - Enable DUMMY Summon Sproutling for (Owner of (Triggering unit))
Unit - Add DUMMY Summon Sproutling to (Attacking unit)
Unit - Order (Attacking unit) to Human Archmage - Summon Water Elemental
Player - Disable DUMMY Summon Sproutling for (Owner of (Triggering unit))