• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

triggered ability starting before projectile hits

Status
Not open for further replies.
Level 5
Joined
Jun 15, 2016
Messages
111
My skill Magic Bolt (based on firebolt) will deal additional damage based on mana. However, everytime it is casted (using the Unit - Starts the effect of an Ability) the additional damage happens even before the projectile hits the enemy.

How to make it so that the triggered ability will happen once the projectile hits?
 
Level 5
Joined
Jun 15, 2016
Messages
111
this is what I meant: For example, you use a the spell Web. Since web is a missile-ability, I will use a trigger that will deal 100 damage to the same targeted unit using Unit - Starts the effect of Ability. However, that 100 damage will occur instantaneously as I use the spell. It wont wait for the web to actually hit the target before it triggers.
 
Level 5
Joined
Jun 15, 2016
Messages
111
That's why I said you need to trigger the ability as well. You can't use the ability that already exist in Warcraft because they are hard coded.

Try BPower's Missile System - Link
It doesnt have anything on a targeted unit. The system is for missile manipulation for unit collision, target area impact and/or destructible collision only.
 
Level 8
Joined
Jan 28, 2016
Messages
486
No, wait!

What Rheiko was trying to explain is that when you use the event, Unit - Starts the effect of Ability, it occurs the moment a spell is cast. For instance when you cast Firebolt, it starts as soon as it is launched. There is no event to detect when a spell has landed unfortunately, so you need to use a missile system (or create your own mini-system specifically for your map) to make something like this work.
 
Level 11
Joined
Jan 23, 2015
Messages
788
Use an ability that applies buff on the target on impact, as a base ability. Then make a trigger that happens every 0.01 seconds and check for a unit that has that buff, if there is such unit, remove the buff and do whatever you want to happen next. If you want to stun the unit, then you'll need a dummy to cast firebolt on it with 9999 missile speed.
 
Level 12
Joined
May 22, 2015
Messages
1,051
Use an ability that applies buff on the target on impact, as a base ability. Then make a trigger that happens every 0.01 seconds and check for a unit that has that buff, if there is such unit, remove the buff and do whatever you want to happen next. If you want to stun the unit, then you'll need a dummy to cast firebolt on it with 9999 missile speed.
That is suuuper costly for just a spell like this.

If you have a spell that applies a unique buff, you can just detect it with a damage detection system. You could also use a dummy to cast the spell (base the hero spell off of chain lightning or channel). Then when the special dummy deals damage, you know it was from this spell. This would need some way to attach the dummy to the parent (or have it not be MUI at all). Both of those options require a DDS. Missile system definitely works as well, as noted already.
 
Level 11
Joined
Jan 23, 2015
Messages
788
That is suuuper costly for just a spell like this.

If you have a spell that applies a unique buff, you can just detect it with a damage detection system. You could also use a dummy to cast the spell (base the hero spell off of chain lightning or channel). Then when the special dummy deals damage, you know it was from this spell. This would need some way to attach the dummy to the parent (or have it not be MUI at all). Both of those options require a DDS. Missile system definitely works as well, as noted already.

lol.. You still think my method is suuuuuuper costly?
You just detect a unit that has that buff which is only used for that spell, remove the buff and do the rest of the job.. To admit, a damage detection system is better than 'every 0.01 sec' trigger, but it works either way...
 
Level 12
Joined
May 22, 2015
Messages
1,051
It wouldn't be so bad if you only check the target of the spell, I guess. It's just not how I would want to trigger something like this. You also need to make sure you know who casted the spell when it hits so that you can get the mana value. It's doable, but I would use a missile system or DDS for it.
 
Level 12
Joined
May 22, 2015
Messages
1,051
Can't you just add a Wait timer to the trigger? Or...
This can't work. Even if you calculate the time based on distance and speed and then use a timer to get an accurate measurement for the delay, it will get messed up if the target moves. It will always have potential to be mistimed with the effect.

There's probably some way to calculate it for variable delay, but then you're getting to the point where building a missile system for homing projectiles will be more simple.
 
Status
Not open for further replies.
Top