• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Other✓] Movesprite Command

Anthroyd

Professor
  • 211
    Posts
    9
    Years
    I'm not sure if this question is best suited in the Script Help thread or not, but that's beside the point.

    I'm hacking Fire Red. If I attempt to use the movesprite command on an NPC that isn't currently loaded onto the screen (the NPC is on the same map but not within the camera's render field), it fails to do anything. If I drag the NPC anywhere in the camera's render field, the movesprite command does work properly. Is this supposed to be the case?
     
    Last edited:
    use movesprite2 command if the NPC isn't near the screen...
    movesprite2 is only used by level scripts.
    There's a load of misinformation about it, it does not move an OW permanently, and it does not move OWs outside the rendered screen either.
    If you wanted to move an OW outside the rendered screen, you're better off using 2 separate OWs and set a flag to hide the first one, then clear a different flag to show the other.
    Or use a level script.
     
    Last edited:
    movesprite2 is only used by level scripts.
    There's a load of misinformation about it, it does not move an OW permanently, and it does not move OWs outside the rendered screen either.
    If you wanted to move an OW outside the rendered screen, you're better off using 2 separate OWs and set a flag to hide the first one, then clear a different flag to show the other.
    Or use a level script.

    It,s not only for level script.I am using that command to move my ow to rendered screen an do animations..And the movesprite2 command really moves the ow permanently....U can see an example in pokemon Life.There is a similar script in that hack..
     
    It,s not only for level script.I am using that command to move my ow to rendered screen an do animations..And the movesprite2 command really moves the ow permanently....U can see an example in pokemon Life.There is a similar script in that hack..

    Alright, after further testing, I can say this with confidence.
    Movesprite2 does not work in a regular script. Only movesprite does.
    Here are my results:
    [PokeCommunity.com] Movesprite Command

    Here is the script I'll be using as a test.
    The reload map special is there just for good measure.

    Result of using above script:
    Spoiler:

    This is just the regular movesprite command.

    Now we'll test with movesprite2:
    [PokeCommunity.com] Movesprite Command


    Result:
    Spoiler:

    As you can see, movesprite2 doesn't move the NPC at all.
    I did not edit the script other than replace 'movesprite' with 'movesprite2'.
    This undeniably proves that movesprite2 is only to be used in a level script. For Firered, anyways. Edit: see my next post.

    If you STILL have your doubts, test it out yourself!
     
    Last edited:
    '---------------
    #org 0x7AFEAC
    lock
    spriteface 0xFF 0x3
    movesprite2 0x6 0x5 0x13
    showsprite 0x6
    special 0x113
    applymovement MOVE_CAMERA 0x876E57E
    applymovement 0x6 0x876E582
    waitmovement 0x0
    msgbox 0x8770658 MSG_NORMAL '"[lightgreen_fr]LOLA:[black_fr] Com..."
    applymovement 0x6 0x876E592
    applymovement MOVE_CAMERA 0x876E592
    waitmovement 0x0
    applymovement 0x7 0x876E599
    waitmovement 0x0
    applymovement 0x6 0x876E59D
    waitmovement 0x0
    applymovement 0x7 0x876E5A2
    waitmovement 0x0
    applymovement MOVE_CAMERA 0x8770B30
    waitmovement 0x0
    hidesprite 0x6
    setflag 0x647
    setvar 0x403A 0x3
    setvar 0x40F7 0x0
    special 0x114
    release
    end


    '---------
    ' Strings
    '---------
    #org 0x770658
    = [lightgreen_fr]LOLA:[black_fr] Come on, [player]!\nThe ship arrived, let's go!


    '-----------
    ' Movements
    '-----------
    #org 0x76E57E
    #raw 0x12 'Step Left (Normal)
    #raw 0x12 'Step Left (Normal)
    #raw 0xFE 'End of Movements

    #org 0x76E582
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0xFE 'End of Movements

    #org 0x76E592
    #raw 0x10 'Step Down (Normal)
    #raw 0x10 'Step Down (Normal)
    #raw 0x10 'Step Down (Normal)
    #raw 0x10 'Step Down (Normal)
    #raw 0x10 'Step Down (Normal)
    #raw 0xFE 'End of Movements

    #org 0x76E599
    #raw 0x13 'Step Right (Normal)
    #raw 0x23 'Step on the Spot Left (Normal)
    #raw 0xFE 'End of Movements

    #org 0x76E59D
    #raw 0x10 'Step Down (Normal)
    #raw 0x10 'Step Down (Normal)
    #raw 0x10 'Step Down (Normal)
    #raw 0xFE 'End of Movements

    #org 0x76E5A2
    #raw 0x12 'Step Left (Normal)
    #raw 0x22 'Step on the Spot Up (Normal)
    #raw 0xFE 'End of Movements

    #org 0x770B30
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x11 'Step Up (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0x13 'Step Right (Normal)
    #raw 0xFE 'End of Movements

    See this, a script from Pokemon LIFE...It obviously works and not a level script....
    Now....what do u exactly want to do with ur script.?
    Move that Mom OW?where is the setflag?
     
    See this, a script from Pokemon LIFE...It obviously works and not a level script....
    Now....what do u exactly want to do with ur script.?
    Move that Mom OW?where is the setflag?
    You could've provided a better statement than copy-pasting a script from a random hack, you know.
    Anyways, after some further testing, the moveprite2 command only works if the NPC being moved is hidden. My bad.
    But, the move is not permanent.
     
    You could've provided a better statement than copy-pasting a script from a random hack, you know.
    Anyways, after some further testing, the moveprite2 command only works if the NPC being moved is hidden. My bad.
    But, the move is not permanent.

    If we use movesprite2 on a hidden sprite, are we able to move the sprite while it is outside of the render field?
     
    I'd assume so. I just had my NPC hidden with a flag, which worked.

    Oh I see. So Lightning X's ripped script was able to move a sprite that was outside the render field because it was hidden when it was moved and the command used was movesprite2 instead of movesprite.

    Thanks for taking the time to investigate!
     
    Back
    Top