HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Hide hero ability.

04-15-2006, 01:46 AM#1
n13astra
Once again guys, need help.

Im trying to create an ability that can be turned on and off, but dont know where to start. Basically, when turned ON, the hero/unit becomes invisible. They can stay invisible for as long as they wish, but if they attack or move, it turns off. Its for a minigame im making, where if your not invisible(hiding) at a certain time, towers will attack you.
04-15-2006, 02:19 AM#2
TaintedReality
You can make it based off a dummy spell which has no target (I'd recommend Channel, but War Stomp would work). Then, when the unit casts the spell spawn a dummy unit and have the dummy unit cast a spell based off of Invisibily with duration 0 (duration 0 lasts forever). Then, when the unit moves or whatever, remove the Invisibility buff from it.

However, there will be a slight delay between the casting of the spell and the invisibility effect. Therefore, I would either use Shadowmeld and just make sure the time is always at night.
04-15-2006, 02:46 AM#3
n13astra
Yeah i see how that would work. How do i cast an ability via triggers?
04-15-2006, 02:58 AM#4
Vuen
Issue an order to the dummy unit to cast it.
04-15-2006, 03:04 AM#5
mmx2000
In case you're unclear how to do that, you can get the order string for the dummy ability from the ability editor (its one of the fields).
04-15-2006, 03:07 AM#6
n13astra
ah yes, its all coming together now. thanks again guys.
04-15-2006, 03:28 AM#7
Orc Dork
make it a mana based shadowmeld, thats easiest
04-15-2006, 03:39 AM#8
n13astra
Ok, so far i've just been playing around so i can understand how this all works, so what ive done is created a dummy spell. When the player uses that spell, this trigger runs, doing the following.

Trigger:
MG 6 Hide Ability
Collapse Events
Unit - A unit Begins casting an ability
Conditions
Collapse Actions
Unit - Create 1 Paladin for Player 12 (Brown) at (Random point in MG 6 Area <gen>) facing Default building facing (270.0) degrees
Unit - Add Blizzard to (Last created unit)
Unit - Order (Last created unit) to blizzard (Casting unit)
Wait 3.00 game-time seconds
Unit - Remove (Last created unit) from the game

Thats not working...

Also, how do i create my own order strings for my ability?
04-15-2006, 03:59 AM#9
TaintedReality
The problem is Blizzard will cost mana..and your order line is messed up too I think (haven't used GUI in a while). Also, depending on how big MG 6 Area is, the Paladin might not be in range to cast Blizzard. But you're on the right track ^^.

It should be: Unit - Order (Last created unit) to Human Archmage - Blizzard (Position of (Casting unit))

You don't need to create your own order strings. If you have a custom ability, use the order string for the ability that it was based off of.
04-15-2006, 09:17 AM#10
Freakazoid
Quote:
Originally Posted by n13astra
Ok, so far i've just been playing around so i can understand how this all works, so what ive done is created a dummy spell. When the player uses that spell, this trigger runs, doing the following.

Trigger:
MG 6 Hide Ability
Collapse Events
Unit - A unit Begins casting an ability
Conditions
Collapse Actions
Unit - Create 1 Paladin for Player 12 (Brown) at (Random point in MG 6 Area <gen>) facing Default building facing (270.0) degrees
Unit - Add Blizzard to (Last created unit)
Unit - Order (Last created unit) to blizzard (Casting unit)
Wait 3.00 game-time seconds
Unit - Remove (Last created unit) from the game

Thats not working...

Also, how do i create my own order strings for my ability?

You should check mana, And you can't "blizzard" a unit, it can only be casted on a point. So u should do like this.


Trigger:
Collapse Events
Unit - A unit Begins casting an ability (or starts an effect)
Conditions
Collapse Actions
Unit - Create 1 Paladin for Player 12 (Brown) at (Random point in MG 6 Area <gen>) facing Default building facing (270.0) degrees
Unit - Add Blizzard to (Last created unit)
Unit - Order (Last created unit) to blizzard (POSITION OF(Casting unit))
Unit - Add a 3 second expiration timer on (last created unit) using General code.

You should add expiraion timer to last created units. It would get bugged if 2 or more players cast it in the 3 second interval.
04-15-2006, 09:39 AM#11
n13astra
Thanks guys, ill have a play around, see what i can come up with, and get back to you.