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

[Trigger] Special effect goes wrong in the trigger

Status
Not open for further replies.

Kusanagi Kuro

Hosted Project: SC
Level 10
Joined
Mar 11, 2012
Messages
708
Hi everyone. I have created a trigger like this:
  • Fire Blast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fire Blast
    • Actions
      • Set FB_CV = (Custom value of (Triggering unit))
      • Set FB_TargetPos[FB_CV] = (Target point of ability being cast)
      • Set FB_Caster[FB_CV] = (Triggering unit)
      • Set FB_AffectedUnit[FB_CV] = (Units within 300.00 of FB_TargetPos[FB_CV] matching ((((((Matching unit) is A structure) Equal to False) and (((Matching unit) is Magic Immune) Equal to False)) and (((Matching unit) is alive) Equal to True)) and (((Matching unit) belongs to an enemy of (Own
      • Set FB_Damage[FB_CV] = (300.00 + (1.00 x (Real((Strength of (Triggering unit) (Include bonuses))))))
      • Unit - Pause (Triggering unit)
      • Animation - Play (Triggering unit)'s attack spell animation
      • Unit - Unpause (Triggering unit)
      • Special Effect - Create a special effect at FB_TargetPos[FB_CV] using Abilities\Spells\Human\FlameStrike\FlameStrike1.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit Group - Pick every unit in FB_AffectedUnit[FB_CV] and do (Actions)
        • Loop - Actions
          • Unit - Cause FB_Caster[FB_CV] to damage (Picked unit), dealing FB_Damage[FB_CV] damage of attack type Spells and damage type Magic
          • Set FB_EffectPoint[FB_CV] = (Position of (Picked unit))
          • Special Effect - Create a special effect at FB_EffectPoint[FB_CV] using Doodads\Cinematic\FireTrapUp\FireTrapUp.mdl
          • Special Effect - Destroy (Last created special effect)
          • Custom script: call RemoveLocation(udg_FB_EffectPoint[udg_FB_CV])
      • Custom script: call RemoveLocation(udg_FB_TargetPos[udg_FB_CV])
      • Custom script: call DestroyGroup(udg_FB_AffectedUnit[udg_FB_CV])
The problem is although the spell still deal damage but the effect doesnt show off. Instead of showing on the target point of ability being cast, it shows off on the center of the map. And the effect for each target doesnt show off too. I dont know what happen to it. Plz help me.
 
Level 16
Joined
Aug 7, 2009
Messages
1,403
It will, but you'll know if that's the problem, and you can try to figure out how to get around it (it's harder in GUI for sure, but you can always use a [v]JASS snippet and do a custom script call). When debugging something leaks don't really matter if that helos you find the issue :)
 
DestroySpecialEffect cause the effect the play it's death animation then "destroys" it so if it doesn't have one, chances are it won't show anything... You can for example attach it to a unit then add a timed life to the unit, after the unit dies, destroy the effect... though you will need to be able to link the effect with the unit...
 

Kusanagi Kuro

Hosted Project: SC
Level 10
Joined
Mar 11, 2012
Messages
708
^ But in my case, the effect doesnt show off at the FB_TargetPoint. It still happens but at the center of the map. My spell is based on channel, casting time is 2s, has 300 aoe, options are visalbe and targeting image. That's all.
 

Kusanagi Kuro

Hosted Project: SC
Level 10
Joined
Mar 11, 2012
Messages
708
Not really an instant spell. It's has the casting time.
I have set the FB_TargetPoint[FB_CV] equal to target point of ability being cast but why it return to 0,0?
 
Status
Not open for further replies.
Top