Hello,
I am making a CTF-style map. There will be a rogue typed hero in the map with a spell called shadowstep (WOW-Rogue-like), in which the unit is moved to the targeted unit, and stunning and attacking it. My spell works great, but now i would like to make it usable only when my Rogue is in Stealth mode and also, if my hero learns the spell and is stealthed, then learn the spell in active mode, and if he isnt stealthed then learn it inactivated.
For stealth mode i have used the following triggers (Stealth_Invisibility equals "ghost ability" used by ud shades)
Shadowstep:
One possible solution which i dont like so much is to build in a condition like: if unit is invisible then use spell, else do nothing..... but by that, the unit would have to get in range of the target to make the player recognize he cant use the spell right now..... very annoying.
thanks in advance for your help,
weisdewad
I am making a CTF-style map. There will be a rogue typed hero in the map with a spell called shadowstep (WOW-Rogue-like), in which the unit is moved to the targeted unit, and stunning and attacking it. My spell works great, but now i would like to make it usable only when my Rogue is in Stealth mode and also, if my hero learns the spell and is stealthed, then learn the spell in active mode, and if he isnt stealthed then learn it inactivated.
For stealth mode i have used the following triggers (Stealth_Invisibility equals "ghost ability" used by ud shades)
Trigger:
- StealthOn
- Events
- Unit - A unit Begins casting an ability
- Conditions
- (Ability being cast) Equal to Stealth
- Actions
- Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Human\FlakCannons\FlakTarget.mdl
- Sound - Play StealthOn <gen> at 100.00% volume, attached to (Triggering unit)
- Unit - Add Stealth_Invisibility to (Triggering unit)
- Unit - Set (Triggering unit) movement speed to (Default movement speed of StealthDummy 0016 <gen>)
- Hero - Drop (Item carried by (Triggering unit) of type FlagType1) from (Triggering unit)
- Hero - Drop (Item carried by (Triggering unit) of type FlagType2) from (Triggering unit)
- Wait 0.10 seconds
- Trigger - Turn off (This trigger)
- Trigger - Turn on StealthOff <gen>
- Events
Trigger:
- StealthOff
- Events
- Unit - A unit Begins casting an ability
- Conditions
- (Ability being cast) Equal to Stealth
- Actions
- Sound - Play StealthOn <gen> at 100.00% volume, attached to (Triggering unit)
- Unit - Remove Stealth_Invisibility from (Triggering unit)
- Unit - Set (Triggering unit) movement speed to (Default movement speed of (Triggering unit))
- Wait 0.10 seconds
- Trigger - Turn off (This trigger)
- Trigger - Turn on StealthOn <gen>
- Events
Shadowstep:
Trigger:
- Shadowstep
- Events
- Unit - A unit Begins casting an ability
- Conditions
- (Ability being cast) Equal to Shadowstep
- Actions
- Set ShadowstepStunned = (Target unit of ability being cast)
- Set ShadowstepLastPos = (Position of (Triggering unit))
- Unit - Create 1 StepDummyAttack for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing (Target point of ability being cast)
- Set ShadowstepStunner = (Last created unit)
- Unit - Order ShadowstepStunner to Attack ShadowstepStunned
- Unit - Add a 1.00 second Generic expiration timer to ShadowstepStunner
- Special Effect - Create a special effect at ShadowstepLastPos using Abilities\Spells\NightElf\Blink\BlinkTarget.mdl
- Special Effect - Create a special effect at ShadowstepLastPos using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
- Unit - Move (Triggering unit) instantly to (Position of ShadowstepStunned)
- Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\NightElf\Blink\BlinkTarget.mdl
- Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl
- Unit - Order (Triggering unit) to Attack ShadowstepStunned
- Custom script: call RemoveLocation (udg_ShadowstepLastPos)
- Events
One possible solution which i dont like so much is to build in a condition like: if unit is invisible then use spell, else do nothing..... but by that, the unit would have to get in range of the target to make the player recognize he cant use the spell right now..... very annoying.
thanks in advance for your help,
weisdewad