• 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.

[Spell] How do i make this :3

Status
Not open for further replies.
Level 14
Joined
Apr 20, 2009
Messages
1,543
how do i make a spell that targets a unit and after you cast it, it auto casts for you until you cancel it by walking away? :3

If I understood correctly you need to create a spell that keeps casting "channeling" when you target a unit?

How about creating a 'channel' ability?

Read more here:
Creating triggered spells with the channel ability.

The above tutorial said:
Disable Other Abilities: The Disable Other Abilities feature will turn off the casting unit's other abilities during the Casting time and Duration.

Follow Through Time: Follow Through Time can determine whether or not the ability is channeling or not. If we want it to be channeling, set the Follow Through Time to the Duration of the spell and remember to set Disable Other Abilities to false.

Target Type: Target Type is the type of target you select. If you want it to be instant meaning no target, if you target a unit,
ground, or both.
 

Kusanagi Kuro

Hosted Project: SC
Level 10
Joined
Mar 11, 2012
Messages
708
I have a solution:
1st, u need to create 2 ability, one is ur main ability, the other is to change the target. Then u create these trigger:
  • Target Select
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (Your Main Ability)
    • Actions
      • Set Caster = (Triggering unit)
      • Set Target = (Target unit of ability being cast)
      • Trigger - Add to Target Lock <gen> the event (Unit - Caster Starts the effect of an ability)
      • Trigger - Add to Target Die <gen> the event (Unit - Target Dies)
      • Trigger - Add to Change Target <gen> the event (Unit - Caster Starts the effect of an ability)
      • Trigger - Turn on Target Lock <gen>
      • Trigger - Turn off (This trigger)
  • Target Lock
    • Events
    • Conditions
      • (Ability being cast) Equal to (Your Main Ability)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Target Not equal to No unit
        • Then - Actions
          • Unit - Order (Triggering unit) to Stop
          • Unit - Order (Triggering unit) to Neutral Alchemist - Acid Bomb Target
        • Else - Actions
  • Change Target
    • Events
    • Conditions
      • (Ability being cast) Equal to (Your Change Target Ability)
    • Actions
      • Trigger - Turn on Target Select <gen>
      • Trigger - Turn off Target Lock <gen>
      • Trigger - Turn off (This trigger)
  • Target Die
    • Events
    • Conditions
    • Actions
      • Set Target = No unit
      • Trigger - Turn on Target Select <gen>
      • Trigger - Turn off Target Lock <gen>
      • Trigger - Turn off (This trigger)

They're all easy for u. :D.
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
I have a solution:
1st, u need to create 2 ability, one is ur main ability, the other is to change the target. Then u create these trigger:
  • Target Select
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to (Your Main Ability)
    • Actions
      • Set Caster = (Triggering unit)
      • Set Target = (Target unit of ability being cast)
      • Trigger - Add to Target Lock <gen> the event (Unit - Caster Starts the effect of an ability)
      • Trigger - Add to Target Die <gen> the event (Unit - Target Dies)
      • Trigger - Add to Change Target <gen> the event (Unit - Caster Starts the effect of an ability)
      • Trigger - Turn on Target Lock <gen>
      • Trigger - Turn off (This trigger)
  • Target Lock
    • Events
    • Conditions
      • (Ability being cast) Equal to (Your Main Ability)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Target Not equal to No unit
        • Then - Actions
          • Unit - Order (Triggering unit) to Stop
          • Unit - Order (Triggering unit) to Neutral Alchemist - Acid Bomb Target
        • Else - Actions
  • Change Target
    • Events
    • Conditions
      • (Ability being cast) Equal to (Your Change Target Ability)
    • Actions
      • Trigger - Turn on Target Select <gen>
      • Trigger - Turn off Target Lock <gen>
      • Trigger - Turn off (This trigger)
  • Target Die
    • Events
    • Conditions
    • Actions
      • Set Target = No unit
      • Trigger - Turn on Target Select <gen>
      • Trigger - Turn off Target Lock <gen>
      • Trigger - Turn off (This trigger)

They're all easy for u. :D.

Sorry but I don't really see why you want to create several triggers to create a channel ability when you can simply create one in the object editor?
In other words: why create several triggers and abilities for something that can be accomplished by 1 trigger and 1 ability?
 

Kusanagi Kuro

Hosted Project: SC
Level 10
Joined
Mar 11, 2012
Messages
708
Hmm. If it's a normal channel ability, I would not create those triggers. I think he want the ability that after u cast it on the unit, the next time u use the spell, the target will be that unit again (if it is like this, then it's absolutely not a channelling ability and my trigger could work for this). But may be I misunderstand him. :D
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
Hmm. If it's a normal channel ability, I would not create those triggers. I think he want the ability that after u cast it on the unit, the next time u use the spell, the target will be that unit again (if it is like this, then it's absolutely not a channelling ability and my trigger could work for this). But may be I misunderstand him. :D

You are correct about the explenation being quite vague.
But I guess that this:

"it auto casts for you until you cancel it by walking away?"

means that he wants to create a channeling ability.
 
Level 11
Joined
Oct 31, 2010
Messages
1,057
hmm i don't know, please do post whatever you think is correct after i explained again :3


Basically, you cast a the spell namely called (air bolt) at a unit, after you cast it , if you do not move or cast the ability at another unit, the ability will be casted again at the unit that you casted on earlier and if you move or cast the ability at another unit, the whole process repeats


Air bolt to unit > No interuptions > continuing casting

Air bolt to unit > interuption > if interuption = recast at another unit > repeat air bolt to unit

Air bolt to unit > interuption > if interuption = stop > do nothing
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
hmm i don't know, please do post whatever you think is correct after i explained again :3


Basically, you cast a the spell namely called (air bolt) at a unit, after you cast it , if you do not move or cast the ability at another unit, the ability will be casted again at the unit that you casted on earlier and if you move or cast the ability at another unit, the whole process repeats


Air bolt to unit > No interuptions > continuing casting

Air bolt to unit > interuption > if interuption = recast at another unit > repeat air bolt to unit

Air bolt to unit > interuption > if interuption = stop > do nothing

did you mean that the hero will throw storm bolt (just example) a million times if they're not interrupted ?
 

Kusanagi Kuro

Hosted Project: SC
Level 10
Joined
Mar 11, 2012
Messages
708
Ok. Then try my trigger. The only different between ur description and my trigger is when u cast the ability to another unit, it will target the same unit as before. But if u want to change the target, u must use another ability or wait until the target dies. However, if u want the order "stop" to change the target of that ability, I can make it for u too.
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
hmm i don't know, please do post whatever you think is correct after i explained again :3


Basically, you cast a the spell namely called (air bolt) at a unit, after you cast it , if you do not move or cast the ability at another unit, the ability will be casted again at the unit that you casted on earlier and if you move or cast the ability at another unit, the whole process repeats


Air bolt to unit > No interuptions > continuing casting

Air bolt to unit > interuption > if interuption = recast at another unit > repeat air bolt to unit

Air bolt to unit > interuption > if interuption = stop > do nothing

So basically: you cast a spell to a targeted unit and it keeps casting untill you order the caster to do something else?

This order can be: casting the same spell to another unit?

Yes you need a channel ability ;)
 
Level 11
Joined
Oct 31, 2010
Messages
1,057
hmm yeah, literally cast storm bolts 100 times if the conditions are not met,

conditions = unit being cast is not dead , unit has a charge of a item called air rune


and yeah, is it possible to do this without triggering ? i got a feeling that i don't have to O:
 
Level 14
Joined
Apr 20, 2009
Messages
1,543
hmm yeah, literally cast storm bolts 100 times if the conditions are not met,

conditions = unit being cast is not dead , unit has a charge of a item called air rune


and yeah, is it possible to do this without triggering ? i got a feeling that i don't have to O:

If it needs to be casted a 100 times, doesn't that mean it's limited instead of limitless?

Don't you want to be able to channel untill the condition is met without any limitations on how many casts or how long that would be?

And yes, you will need to trigger this unfortunately.

You could create a simple continuous timer to cast the storm bolt every ... seconds and use a condition to stop it whenever this event occurs:
  • Unit - A unit Stops casting an ability
Just create a boolean that is set to true or false whenever the ability is casting or not.

Use something like this:
  • Start Casting channel ability
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • Ability being cast is equal to your channel ability
    • Actions
      • Countdown Timer - Start Time as a continuous timer that will expire in 0.4 seconds
Simply create a trigger in which the event is:
  • Time - Time expires
Make sure to save the caster and target in a hashtable so that you can load it inside the expiring timer trigger making this spell MUI.
Now simply create all the conditions and actions you need to shoot the storm bolt towards the target inside the time expires trigger.
Don't forget to check for the "still casting" boolean to be true or false.

I'm not sure if a negative value in the duration field makes the channel ability limitless.
If not you might want to create another trigger that targets the same unit again when the spell is finnished instead of stopped.
  • Unit - A unit Finnishes casting an ability

EDIT: I am not going to give you the triggers you need. This is very simple to create.
Plus I gave you enough guidelines on how to correctly do it.
If you can't seem to do it you might want to look into some tutorials on creating spells with triggers.
 
Last edited:
Status
Not open for further replies.
Top