Convert MoveUnit to SFX

Status
Not open for further replies.
Can someone help me convert this line (SetUnitX() and SetUnitY()) and make it move Special Effects instead of Unit?

• Shoot_Dummy is a dummy missile unit.

  • Custom script: call SetUnitX(udg_Shoot_Dummy[udg_Shoot_CurrentIndex], GetUnitX(udg_Shoot_Dummy[udg_Shoot_CurrentIndex]) + udg_Shoot_AngleX[udg_Shoot_CurrentIndex])
  • Custom script: call SetUnitY(udg_Shoot_Dummy[udg_Shoot_CurrentIndex], GetUnitY(udg_Shoot_Dummy[udg_Shoot_CurrentIndex]) + udg_Shoot_AngleY[udg_Shoot_CurrentIndex])
 
Last edited:

Wrda

Spell Reviewer
Level 28
Joined
Nov 18, 2012
Messages
2,010
?? Just use the new special effect natives, you can check them on common.j from "...Documents\Warcraft III\JassHelper"
  • Custom script: call BlzSetSpecialEffectX(udg_SpecialEffect, GetUnitX(udg_Shoot_Dummy[udg_Shoot_CurrentIndex]) + udg_Shoot_AngleX[udg_Shoot_CurrentIndex])
  • Custom script: call BlzSetSpecialEffectY(udg_SpecialEffect, GetUnitY(udg_Shoot_Dummy[udg_Shoot_CurrentIndex]) + udg_Shoot_AngleY[udg_Shoot_CurrentIndex])
I'm not sure if I understood your problem.
 
I'm trying to convert the missiles (good ol' dummy units) into special effects (with the new natives). What I understand in the custom script you made is you're attaching the SFX to the dummy unit, I want is to get rid of the dummy completely and fully utilize the special effects by moving the SFX instead of a dummy unit.
 
Last edited:
Sorry I realized I am actually missing some variables at the main post. Also, I thought he's attaching it because he used the location of the unit. :) I fixed it, it works now. Thanks for pointing that out.

  • call BlzSetSpecialEffectX(udg_SpecialEffect, udg_Shoot_CurrentMissilePosX[udg_ShootCurrentIndex] + udg_Shoot_AngleX[udg_Shoot_CurrentIndex])
  • call BlzSetSpecialEffectY(udg_SpecialEffect, udg_Shoot_CurrentMissilePosY[udg_ShootCurrentIndex] + udg_Shoot_AngleY[udg_Shoot_CurrentIndex])
 
Status
Not open for further replies.
Top