[Solved] Single Target wait condition

Level 8
Joined
Oct 6, 2022
Messages
185
Hey guys, i would like to know how to do a single target skill that has a condition like this.

  • TargetWait
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Chain Lightning(1 target)
    • Actions
      • Set T_Unit[1] = (Triggering unit)
      • Set T_Unit[2] = (Target unit of ability being cast)
the player needs to wait for 2 seconds before he could cause/launch a damage to his target this is what he needs to do:
player must not move, stun or any types buffs that could cause immobilize, is alive, not cast any ability including items. <=== If the player didn't not follow these requirements the damage that he will deal to his target will be canceled.


hope you guys could help me with it by showing how the trigger
 
Level 14
Joined
Jan 10, 2023
Messages
247
Use channel as the base ability and use the field "Follow-through time".
That sets how long the caster will channel after casting.
You can also choose whether the ability will disable other abilities, so the caster can't self-interrupt the spell.

To make it so that they can't be stunned and such, spell immunity/ giving invulnerability to the cast until they finish casting might be the simplest option.
 
Level 8
Joined
Oct 6, 2022
Messages
185
base from my knowledge, computers/ai can't cast channel.
on the other hand, it'll be great if the players who use him should follow the conditions/requirements when casting that ability to make the hero a bit risky to use when casting the Chain Lightning(1 target) at the same time when an ai use him and cast the Chain Lightning(1 target) they'll follow the rules/requirements of this skill.
 
Level 14
Joined
Jan 10, 2023
Messages
247
I see what you mean about AI.
I can try a few things when I'm home.

In the meantime, would something like Siphon Mana be an option? I think you should look for something that causes the caster to channel and also has a single target, Siphon Mana may be a good base, although then the target may be required to have mana.
 
Level 18
Joined
Dec 20, 2012
Messages
269
base from my knowledge, computers/ai can't cast channel.
on the other hand, it'll be great if the players who use him should follow the conditions/requirements when casting that ability to make the hero a bit risky to use when casting the Chain Lightning(1 target) at the same time when an ai use him and cast the Chain Lightning(1 target) they'll follow the rules/requirements of this skill.
Hm if you want channel to be used by ai then I recommend Riki's system though personally I have not used it yet.
 
Level 8
Joined
Oct 6, 2022
Messages
185
I see what you mean about AI.
I can try a few things when I'm home.

In the meantime, would something like Siphon Mana be an option? I think you should look for something that causes the caster to channel and also has a single target, Siphon Mana may be a good base, although then the target may be required to have mana.
Life Drain also, but i think that'll need the damage engine. though i have few knowledge about doin something on the damage engine, idk how would do that out since it's something different that I've never did and might cause me trouble figuring out.



Hm if you want channel to be used by ai then I recommend Riki's system though personally I have not used it yet.
unfortunately i won't be able to open that since I'm using 1.30 version, but thanks a anyways.
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
You can still use Casting Time. Just trigger the animation yourself, in fact I have a system for this:

But you don't necessarily need to use the system. For the sake of keeping things simple I'll show you how to do it directly:
  • TargetWait Animation
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to Chain Lightning(1 target)
    • Actions
      • Wait 0.01 seconds
      • Unit - Play (Triggering unit)'s spell animation
      • Unit - Queue (Triggering unit)'s stand animation
^ This Event runs when the Casting Time begins. All you need to do is go into the Object Editor and set the Art - Animation for Chain Lightning(1 target) to "stand". This is to prevent the spell animation from playing twice.

Obviously Waits are not ideal but they're necessary to prevent the triggered animation from getting interrupted by the default cast animation. My system relies on a 0.00 second Timer which plays the desired animation 1 frame later which is must faster and reliable.
 
Last edited:

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
alright, I'll try that. thanks Uncle I'll update you guys later.
Oh and the animation isn't delayed when using Casting Time - I assumed you had tested this when you made that comment.

Even with Casting Time the unit will immediately start playing the "spell" animation. Then once the spell executes it's effects it will play the Art - Animation Name that you've assigned the ability. So the trigger I suggested may not even be necessary.
 
Level 8
Joined
Oct 6, 2022
Messages
185
I've tested the spell before where i rely only to the Casting time, the animation gets delayed. it's Chaosium's suggestion before and i answered the same.


so this one that you've suggested really helped me out, so thank you.
  • TargetWait Animation
    • Events
      • Unit - A unit Begins channeling an ability
    • Conditions
      • (Ability being cast) Equal to Chain Lightning(1 target)
    • Actions
      • Wait 0.01 seconds
      • Unit - Play (Triggering unit)'s spell animation
      • Unit - Queue (Triggering unit)'s stand animation
^ This Event runs when the Casting Time begins. All you need to do is go into the Object Editor and set the Art - Animation for Chain Lightning(1 target) to "stand". This is to prevent the spell animation from playing twice.

Obviously Waits are not ideal but they're necessary to prevent the triggered animation from getting interrupted by the default cast animation. My system relies on a 0.00 second Timer which plays the desired animation 1 frame later which is must faster and reliable.
 
Top