1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  4. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  5. Units have been turned into heroes in our latest Icon Contest! Vote for the best icon set at the Icon Contest #18 Poll!
    Dismiss Notice
  6. The poll for Hive's 12th Concept Art Contest is up! Go cast your vote for your favourite genie!
    Dismiss Notice
  7. The raddest synthwave tracks were chosen - Check out our Music Contest #12 - Results and congratulate the winners!
    Dismiss Notice
  8. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[JASS] SetUnitX and SetUnitY don't work

Discussion in 'Triggers & Scripts' started by Saishy, Feb 12, 2009.

  1. Saishy

    Saishy

    Joined:
    Mar 23, 2008
    Messages:
    947
    Resources:
    0
    Resources:
    0
    I was using:

    Code (vJASS):

    SetUnitPosition(k.tsubaki, k.x, k.y)
     


    And my spell worked, but since the unit keep reseting animation and look strange, I tried using setunitx and setunity... but the unit didn't moved at all! So I tough I did something wrong, put some debugmsg but the value was correct !?

    Code (vJASS):

            call BJDebugMsg(R2S(k.x))
            call BJDebugMsg(R2S(k.y))
            call BJDebugMsg("----------")
            call SetUnitX(k.tsubaki, k.x)
            call SetUnitY(k.tsubaki, k.y)
     


    So... If the value of k.x and k.y is correct, why the unit don't move there after all?
     
  2. Element of Water

    Element of Water

    Joined:
    Aug 3, 2008
    Messages:
    2,298
    Resources:
    5
    Spells:
    3
    Tutorials:
    1
    JASS:
    1
    Resources:
    5
    Is k.tsubaki correct?
     
  3. spiwn

    spiwn

    Joined:
    Apr 27, 2008
    Messages:
    1,228
    Resources:
    0
    Resources:
    0
    Does the unit have its own model?
    If you are moving dummyies with attached effect, setunitx and setunity wont move the effect.
     
  4. Saishy

    Saishy

    Joined:
    Mar 23, 2008
    Messages:
    947
    Resources:
    0
    Resources:
    0
    I'm using a unit with the Units Missile - Priest, that little blue bird.
     
  5. Justify

    Justify

    Joined:
    Mar 16, 2008
    Messages:
    935
    Resources:
    5
    Models:
    1
    Icons:
    1
    Spells:
    3
    Resources:
    5
    Movementspeed > 0? Else it won't work, part of SetUnitX and Y
     
  6. Saishy

    Saishy

    Joined:
    Mar 23, 2008
    Messages:
    947
    Resources:
    0
    Resources:
    0
    O.O

    Lol thanks, raped rep'ed!
     
  7. Element of Water

    Element of Water

    Joined:
    Aug 3, 2008
    Messages:
    2,298
    Resources:
    5
    Spells:
    3
    Tutorials:
    1
    JASS:
    1
    Resources:
    5