• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

SetUnitX/Y - Compilation Error

Status
Not open for further replies.
Hello, for move a unit without cancel any orders, i used the SetUnitXY JASS fonction, but i have a compilation error. I can't correct this error with my Jass knowledge, so i need oyur help :

Here are the trigger and the custom code script :
JASS:
function SetUnitXY takes unit u, real x, real y returns nothing
    call SetUnitX(u, x)
    call SetUnitY(u, y)
endfunction
  • Starfall Loop
    • Evénements
      • Temps - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from SF_Index2 to SF_Index, do (Actions)
        • Boucle - Actions
          • Set SF_Point = (Position of SF_Caster[(Integer A)])
          • Set SF_CoorX = (X of SF_Point)
          • Set SF_CoorY = (Y of SF_Point)
          • Custom script: call SetUnitXY(udg_SF_Dummy[Integer A], udg_SF_CoorX, udg_SF_CoorY)
          • Custom script: call RemoveLocation( udg_SF_Point )
 
Hmm, no compilation error now, but SF_Dummy[IntegerA] is still not moving.

  • Starfall
    • Evénements
      • Unité - A unit Initie l'effet d'une compétence
    • Conditions
      • (Ability being cast) Egal Ã* Etoile Filante
    • Actions
      • Déclencheur - Turn on Starfall Loop <gen>
      • Déclencheur - Turn on Starfall End <gen>
      • Set SF_Index = (SF_Index + 1)
      • Set SF_Caster[SF_Index] = (Casting unit)
      • Set SF_Point = (Position of (Triggering unit))
      • Unité - Create 1 Starfall Dummy Dummy for (Owner of (Triggering unit)) at SF_Point facing Orientation bâtiment par défaut degrees
      • Unité - Set level of Starfall Dummy for (Last created unit) to (Level of Etoile Filante for (Triggering unit))
      • Unité - Order (Last created unit) to Prêtresse de la lune elfe de la nuit - Etoile filante
      • Set SF_Dummy[SF_Index] = (Last created unit)
      • Custom script: call RemoveLocation( udg_SF_Point )
  • Starfall Loop
    • Evénements
      • Temps - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from SF_Index2 to SF_Index, do (Actions)
        • Boucle - Actions
          • Set SF_Point = (Position of SF_Caster[(Integer A)])
          • Set SF_CoorX = (X of SF_Point)
          • Set SF_CoorY = (Y of SF_Point)
          • Custom script: call SetUnitXY(udg_SF_Dummy[bj_forLoopAIndex], udg_SF_CoorX, udg_SF_CoorY)
          • Custom script: call RemoveLocation( udg_SF_Point )
  • Starfall End
    • Evénements
      • Unité - A unit Meurt
    • Conditions
      • (Unit-type of (Dying unit)) Egal Ã* Starfall Dummy Dummy
    • Actions
      • Set SF_Index2 = (SF_Index2 + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • Si - Conditions
          • SF_Index Egal Ã* SF_Index2
        • Alors - Actions
          • Déclencheur - Turn off Starfall Loop <gen>
          • Déclencheur - Turn off (This trigger)
        • Sinon - Actions
 
Status
Not open for further replies.
Top