• 🏆 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!

Spell Help

Status
Not open for further replies.
Level 2
Joined
May 2, 2011
Messages
15
This Skill damages the enemy depending on the intelligence of the caster.I am using the trigger Cause Unit to Damage enemy but before the projectile hits the target the target first is damaged by the trigger.Any Suggestions
 
Level 6
Joined
Oct 4, 2011
Messages
226
Can I see your trigger(s)? The damage should be done in the "Loop trigger" with an periodic time event, every (.03, .02, .01) seconds. It should only be done if the "Real" which would be "If the distance between the position of projectile and position of target greater than 0", then do: (Move projectile, save distance) else do: (damage will be done here, hashtable info will be cleared here if used, and if the projectile is in the unit group it should be removed from it here.)
 
I think to that spell is not so simple as you think. I think you should use much more complicated spell. Exp When caster starts the effect of the ability the dummy will appear and select custom value of last created unit to int. of casting unit after that dummy should be added in unit group and with loop trigger should move to target and when it gets near enemy it will kill himself and dealt custom value to target unit. If this do not help you a lot go on spell forum and dl some maps with knockback and study them
 
Level 16
Joined
Mar 3, 2006
Messages
1,564
You have to create a triggers that create a dummy missile and another trigger that runs by a repeating timer; that trigger will move the dummy created from the first trigger then do an IF/THEN/ELSE that checks if the dummy has reached the target, if it reached the target then do the damage stuff based on intelligence or whatever you want.
 
Level 14
Joined
Aug 8, 2010
Messages
1,022
I actually have another idea without a custom projectile system. You have to calculate the time for which the projectile reaches the target. That can be done with the action "Distance between units/point" then you need to practice what time belongs to let's say 300 units. For example - each 300 units need 0.3 seconds. Then when that times is 0, you order the trigger to deal damage.

This is not a perfect way to do this, but i just give an idea. :)
 
Status
Not open for further replies.
Top