• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

Charge type spell help

Status
Not open for further replies.
Level 8
Joined
Dec 7, 2008
Messages
363
Hi there,

I would like to make a spell where the hero runs to a target unit quickly and deals 200 damage to the unit once he arrives, then revert back to normal speed.

I would like to know the triggers that would be used for this.
I need to know how to stop the player from moving him mid spell, how to detect when he gets to the unit and anything else you see as important.
 
It ocurrs to me that you can remove unit selection from player, make unit attack once and modify speed.

Triggers are:
-> Selection - Remove unit from selection for player
-> Selection - Add to selection for player
> You can use other selection triggers
-> Unit - Set Movement Speed
-> Unit - Issue order targecting a unit
-> Unit - Order unit to damage target

So you will do something like this
  • CastAbility
  • Events
    • Unit casts an ability
  • Conditions
    • Ability being cast equal to (your ability)
  • Actions
    • set caster=triggering unit
    • set target=target unit of ability being cast
    • Remove (caster) from selection for (Owner of (caster))
    • Order (caster) to attack once (target)
    • Set unit movement speed to xxx
Then create another trigger that goes like this
  • Collision
  • Events
    • Unit is attacked
  • Conditions
    • Attacked unit = target
    • Attacking unit = caster
  • Actions
    • set unit movement speed to default
    • effects/pushback/etc
    • damage
    • Add (caster) selection to (owner of (caster))
    • set caster = no unit
    • set target = no unit
Something like this should work in GUI.

Play a little with the editor and it will work

You can try searching for keywords.

Maybe you want the unit to accelerate while charging, you can do this by using one more trigger, which executes every xxx time and increases current speed in a certain amount until it reaches a certain speed.
 
It ocurrs to me that you can remove unit selection from player, make unit attack once and modify speed.

Triggers are:
-> Selection - Remove unit from selection for player
-> Selection - Add to selection for player
> You can use other selection triggers
-> Unit - Set Movement Speed
-> Unit - Issue order targecting a unit
-> Unit - Order unit to damage target

So you will do something like this
  • CastAbility
  • Events
    • Unit casts an ability
  • Conditions
    • Ability being cast equal to (your ability)
  • Actions
    • set caster=triggering unit
    • set target=target unit of ability being cast
    • Remove (caster) from selection for (Owner of (caster))
    • Order (caster) to attack once (target)
    • Set unit movement speed to xxx
Then create another trigger that goes like this
  • Collision
  • Events
    • Unit is attacked
  • Conditions
    • Attacked unit = target
    • Attacking unit = caster
  • Actions
    • set unit movement speed to default
    • effects/pushback/etc
    • damage
    • Add (caster) selection to (owner of (caster))
    • set caster = no unit
    • set target = no unit
Something like this should work in GUI.

Play a little with the editor and it will work

You can try searching for keywords.

Maybe you want the unit to accelerate while charging, you can do this by using one more trigger, which executes every xxx time and increases current speed in a certain amount until it reaches a certain speed.

i think it's not MUI because when a unit cast that spell, the variable sets, and when another unit cast before the first arrive in target, and the variable sets again, replacing the before.
as the result, the first caster will never get his normal speed

use indexing system
 
That's quite right, but I don't know better, and if he is going to have only one of this units in his map, he'll have no trouble at all.
 
Status
Not open for further replies.
Back
Top