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

[JASS] Spell Help Required

Status
Not open for further replies.
Level 7
Joined
Jul 9, 2008
Messages
253
Hello everybody, I need some help with spells. I would like to have a spell that creates a special effect on the caster before it actually casts the effects of the spells.

Example: Divine Strike

It deals damage ( not important ) but I would like it to create a light effect on the weapon as it swings, and then deals the damage.

I have no idea how to make this, that's why I'm asking how.

If anyone has an idea please tell me. Or if anyone wants to make the trigger that would be awesome. ( jass prefer ( not vjass ) )

Thanks in advance, Quetzalcotl
 
You can simply add your effect to it.

First, find the model's path. Then use this function:
JASS:
native AddSpecialEffectTarget takes string modelName, widget targetWidget, string attachPointName returns effect

modelName : The string path of the effect's file.
targetWidget : The widget you want to place it on. This includes units, destructibles, and items.
attachPointName : The area you want the special effect to be.

Example:
JASS:
   local effect fx = AddSpecialEffectTarget("Abilities\\Weapons\\DragonHawkMissile\\DragonHawkMissile.mdl",gg_unit_hfoo_0003,"weapon")

You just can replace the ones you need to. Replace the path and replace the unit, that was just for a test. =P Just register the ability event, then add the effect, do a wait, and then destroy it and null the effect. The wait can just be based on the unit's swing timer (melee attack speed). Simple as that. =)
fxcreate.jpgfxdestroy.jpg

Here is a list of the attachment points as far as I know:
  • Overhead
  • Head
  • Chest
  • Origin
  • Hand
  • Foot
  • Weapon
  • Sprite
  • Medium
  • Large
  • Right Hand
  • Left Hand
  • Right Foot
  • Left Foot
  • Front Right Foot (Animals)
  • Front Left Foot (Animals)
  • Back Right Foot (Animals)
  • Back Left Foot (Animals)
  • First Sprite (Buildings)
  • Second Sprite (Buildings)
  • Third Sprite (Buildings)
  • Fourth Sprite (Buildings)
  • Fifth Sprite (Buildings)
  • Sixth Sprite (Buildings)
  • Rallypoint Sprite (Buildings)
  • First Medium (Buildings)
  • Second Medium (Buildings)
  • Third Medium (Buildings)
  • Fourth Medium (Buildings)
  • Fifth Medium (Buildings)
  • Sixth Medium (Buildings)
  • Rallypoint Medium (Buildings)
  • First Large (Buildings)
  • Second Large (Buildings)
  • Third Large (Buildings)
  • Fourth Large (Buildings)
  • Fifth Large (Buildings)
  • Sixth Large (Buildings)
 
Status
Not open for further replies.
Top