• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Trying to make some custom spells

Status
Not open for further replies.
Level 9
Joined
Apr 19, 2011
Messages
447
Hi.

I want a few custom spells for a map I'm doing, and I'm trying to make the following thing:
When I press the "E" key, mi hero dissappears for half second, and then appears again (it's an evade movement).
I tried using a custom ability based on the channel spell, with "E" as a shortcut, and making the ability invisible (I don't want it to be visible), but it doesn't works.

Someone knows what can I do?

Regards
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
Use Wind Walk as the base ability.

When the unit starts the effect of the ability, give it modified Evasion, with 1.00 evade chance. That will make all normal melee and ranged attacks miss. Not spells though. For spell damage reduction, give the unit Spell Damage Reduction, item ability. Remove the after a short period, like when the unit finishes casting the ability. Or use a contdown timer.
 
Level 4
Joined
Aug 17, 2011
Messages
119
make a blank spell (remove effects) & set short-cut button to 'E' in object editor.

make trigger that sets evasion to 99/100% for 0.5 seconds every time spell is cast.

dont have Editor on this machine... but try something like:

Event
-unit casts an ability
Conditions
-caster = your hero
-ability being cast is = (your move)
Actions
-set evasion of casting unit to 100% for 0.5 seconds

(or something like that)
 
Level 30
Joined
Jan 31, 2010
Messages
3,552
Guys, he doesn't want hero invulnerable, but to disappear. Phase Shift is the solution, I think, thought it can be broken by any other form of active action or Movement.
You can just trigger it to Hide the unit for 0.5 seconds, and then unhide (but this removes selections).
 
Level 8
Joined
Jan 8, 2010
Messages
493
yeah, Phase Shift with a max duration of 0.5 second should do the trick. since he wants it to be an evade movement, which Phase Shift does (prevents any damage because the "disappeared" unit is invulnerable). he can try to make it look not autocast-able by changing the borders but when a player accidentally right clicks it, it will show the border-running lines XD

that's for the non-triggering suggestion like Apheraz said.

for the triggering suggestion:
you can "hide" the unit by making it 100% transparent, or use a passive hero transformation to change it into something like sparkles or effects to make it look hidden, while making it invulnerable for 0.5 seconds. after using a countdown make it vulnerable again.
this part will just make sure the spell is not autocast-able. but it's the same effect Phase Shift does, and without the reappearing stuff when you order a unit while it is phase shifted.
 
Level 9
Joined
Apr 19, 2011
Messages
447
Look, I think the easier way to understand what I'm trying to do is to post my triggers:
NOTE: Remember, I'm spanish. Because of that, some things are in spanish, and I have the spanish version of the program. I hope this is not a problem.

This trigger should start when I press the "E" key.
  • Events
    • Unidad - A unit owned by Jugador 1 (rojo) Inicia el efecto de una habilidad
  • Conditions
    • (Ability being cast) Igual a EVASIÓN
  • Actions
    • -------- Asignar extremos de la región de evasión --------
    • Set Evasion_1 = ((Position of Jugador) offset by (256.00, 256.00))
    • Set Evasion_2 = ((Position of Jugador) offset by (-256.00, -256.00))
    • -------- Asignar región de evasión --------
    • Set Random_Evade = (Region(Evasion_1, Evasion_2))
    • -------- Realizar evasión --------
    • Detonador - Run Usar evasion 1 <gen> (checking conditions)
This trigger is the evade movement.
  • Events
  • Conditions
  • Actions
    • -------- Maniobra de evasión --------
    • Detonador - Turn off Asignar region de evasion 1 <gen>
    • Wait 0.20 seconds
    • Efecto especial - Create a special effect at (Position of Jugador) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
    • Unidad - Hide Jugador
    • Unidad - Make Jugador Invulnerable
    • Wait 0.50 seconds
    • -------- Mover nueva posición --------
    • Detonador - Turn on Asignar region de evasion 1 <gen>
    • Unidad - Move Jugador instantly to (Random point in Random_Evade)
    • Efecto especial - Create a special effect at (Position of Jugador) using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
    • Unidad - Unhide Jugador
    • Unidad - Make Jugador Vulnerable
The ability has the shortcut "E", and is invisible. I want it to be invisible, if it's possible. It doesn't work.
I'm a bit noob with this kind of triggers, so I wait for a lot of critics. What can you recommend me?

Regards
 
Level 8
Joined
Jan 8, 2010
Messages
493
*i can't understand spanish fully, but i can make out from your triggers

you have leaks (position leaks and special effect leaks).

from what i can make out, when you use the EVASION the unit will move to a random point in a rectangular region defined by Evasion_1 and Evasion_2 from the first trigger. right? instead of defining a rectangular region, you can just use the Point with Polar Offset. here's a trigger much like yours:

  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to EVASION
  • Actions
    • Set Point1 = (Position of (Triggering unit))
    • Set Point2 = (Point1 offset by 256.00 towards (Random number between 0.00 and 360.0) degrees)
    • Special Effect - Create a special effect at Point1 using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
    • Special Effect - Destroy (Last created special effect)
    • Animation - Change (Triggering unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 100.00% transparency
    • Unit - Make (Triggering unit) Invulnerable
    • Wait 0.50 seconds
    • Unit - Move (Triggering unit) instantly to Point2
    • Special Effect - Create a special effect at Point2 using Abilities\Spells\Orc\MirrorImage\MirrorImageCaster.mdl
    • Special Effect - Destroy (Last created special effect)
    • Animation - Change (Triggering unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
    • Unit - Make (Triggering unit) Vulnerable
    • Custom script: call RemoveLocation(udg_Point1)
    • Custom script: call RemoveLocation(udg_Point2)
in that trigger, Point1 saves the position of the caster, while Point2 saves the offset. the Animation function will make the unit transparent. it is not hidden, so you will still have it selected. if you want to still Hide the unit, just change that part. and there's how you remove leaks.

i'm not just 100% sure about using a Wait in this trigger. someone should be able to enlighten us here.
 
Level 30
Joined
Jan 31, 2010
Messages
3,552
Any ability whom's hotkey can be actively used has to have a place in the status bar. You can remove the icon and tool tips, but I doubt that the green casting circle won't be displayed.
As ronojales said, you leak Special Effects, Units and Points. For more information, check out the tutorial at the bottom of this post.
Anyways, wait functions should never be used. Use Timers or repeatable variabled triggers instead.

http://www.hiveworkshop.com/forums/general-mapping-tutorials-278/complete-list-things-leak-126761/
 
Level 8
Joined
Jan 8, 2010
Messages
493
*i know that using Waits should be prevented, especially around triggers with (Last created unit). but in the trigger i've shown the unit is referred to as (Triggering unit), so i'm not 100% sure if using a Wait there is alright since the same (Triggering unit) is referred to in that one trigger.
 
Level 9
Joined
Apr 19, 2011
Messages
447
@ ronojales: OK, I'll try to remove those leaks. And yes, I think it's better idea to use the point with polar offset.

@ Apheraz Lucent: You said that an ability needs to be visible in order to use its hotkey... Can the trigger be activated with the "E" key without seeing the ability in the interface? Is there any other way to do it?

Note: Why the "Wait" function should never be used? I don't understand it.

Thanks for reading.

Regards
 
Level 8
Joined
Jan 8, 2010
Messages
493
the "wait" function, as much as possible, should be avoided. especially for making MUI spells. for example, you have this trigger in a spell.
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • Ability being cast Equal to AbilityA
  • Actions
    • Create 1 Footman for Triggering Player..
    • Make (Last created unit) Invulnerable
    • Wait 1.00 second
    • Make (Last created unit) Vulnerable
in that trigger, you cast an ability that creates a Footman and makes it invulnerable for 1 second. if in that 1-second another unit is created via any method (summon, trigger) then the Last created unit will now refer to that last created unit, and not the Footman you have. so it will bug, making that Footman invulnerable.

however, there are instances like
  • Events
    • Unit - A unit Dies
  • ...
  • Actions
    • ...
    • Wait 10.00 seconds
    • Create 1 (Unit-type of (Triggering Unit)) at Point...
in that trigger, the Triggering unit will always refer to the unit that starts that trigger. so no matter how long the wait you input, it will still refer to the dying unit.
 
Level 4
Joined
Aug 17, 2011
Messages
119
you can probably use it as a chat command, but you'll have to hit enter, press E and hit enter again. not what you are looking for I assume....
 
Level 9
Joined
Apr 19, 2011
Messages
447
Sorry for taking so long to answer.
Finally, I'm going to try the way that "Kno Mad" said, using a chat command. It's not exactly what I was looking for, but it's simple and easy to do, and with some effort it will work fine.
Anyway, +rep to all of you, and thanks for your help and attention.

Regards
 
Status
Not open for further replies.
Top