The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Other Movesprite Command

Notices
For all updates, view the main page.

Binary ROM Hacking Need a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old June 22nd, 2016 (2:37 PM). Edited June 23rd, 2016 by Anthroyd.
Anthroyd's Avatar
Anthroyd Anthroyd is offline
Professor
 
Join Date: May 2016
Location: United States
Gender: Male
Posts: 210
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?
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old June 22nd, 2016 (4:35 PM).
Squeetz's Avatar
Squeetz Squeetz is offline
ROM Hacker
 
Join Date: Jun 2013
Location: Norway
Age: 25
Gender: Male
Nature: Quiet
Posts: 236
Quote:
Originally Posted by Anthroyd View Post
Is this supposed to be the case?
Yes indeed.
__________________
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old June 23rd, 2016 (7:22 AM).
Phantom Phoenix's Avatar
Phantom Phoenix Phantom Phoenix is offline
Lost on the road of life
 
Join Date: Oct 2015
Location: ???
Age: 26
Gender: Male
Nature: Calm
Posts: 167
Quote:
Originally Posted by Squeetz View Post
Yes indeed.
use movesprite2 command if the NPC isn't near the screen...
__________________
Pokemon XYZ Version
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old June 23rd, 2016 (12:47 PM).
Anthroyd's Avatar
Anthroyd Anthroyd is offline
Professor
 
Join Date: May 2016
Location: United States
Gender: Male
Posts: 210
Quote:
Originally Posted by Lightning X View Post
use movesprite2 command if the NPC isn't near the screen...
The movesprite2 command didn't work while the NPC was not being rendered, unfortunately.

Quote:
Originally Posted by Squeetz
Yes indeed.
I'll assume this is the case. Thank you.
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old June 24th, 2016 (3:06 AM). Edited June 24th, 2016 by Squeetz.
Squeetz's Avatar
Squeetz Squeetz is offline
ROM Hacker
 
Join Date: Jun 2013
Location: Norway
Age: 25
Gender: Male
Nature: Quiet
Posts: 236
Quote:
Originally Posted by Lightning X View Post
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.
__________________
Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old June 24th, 2016 (10:14 AM).
Phantom Phoenix's Avatar
Phantom Phoenix Phantom Phoenix is offline
Lost on the road of life
 
Join Date: Oct 2015
Location: ???
Age: 26
Gender: Male
Nature: Calm
Posts: 167
Quote:
Originally Posted by Squeetz View Post
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..
__________________
Pokemon XYZ Version
Reply With Quote
  #7   Link to this post, but load the entire thread.  
Old June 24th, 2016 (3:19 PM). Edited June 24th, 2016 by Squeetz.
Squeetz's Avatar
Squeetz Squeetz is offline
ROM Hacker
 
Join Date: Jun 2013
Location: Norway
Age: 25
Gender: Male
Nature: Quiet
Posts: 236
Quote:
Originally Posted by Lightning X View Post
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:

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:


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!
__________________
Reply With Quote
  #8   Link to this post, but load the entire thread.  
Old June 24th, 2016 (3:40 PM).
Phantom Phoenix's Avatar
Phantom Phoenix Phantom Phoenix is offline
Lost on the road of life
 
Join Date: Oct 2015
Location: ???
Age: 26
Gender: Male
Nature: Calm
Posts: 167
'---------------
#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?
__________________
Pokemon XYZ Version
Reply With Quote
  #9   Link to this post, but load the entire thread.  
Old June 24th, 2016 (3:57 PM).
Squeetz's Avatar
Squeetz Squeetz is offline
ROM Hacker
 
Join Date: Jun 2013
Location: Norway
Age: 25
Gender: Male
Nature: Quiet
Posts: 236
Quote:
Originally Posted by Lightning X View Post
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.
__________________
Reply With Quote
  #10   Link to this post, but load the entire thread.  
Old June 24th, 2016 (4:00 PM).
Anthroyd's Avatar
Anthroyd Anthroyd is offline
Professor
 
Join Date: May 2016
Location: United States
Gender: Male
Posts: 210
Quote:
Originally Posted by Squeetz View Post
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?
Reply With Quote
  #11   Link to this post, but load the entire thread.  
Old June 24th, 2016 (4:09 PM).
Squeetz's Avatar
Squeetz Squeetz is offline
ROM Hacker
 
Join Date: Jun 2013
Location: Norway
Age: 25
Gender: Male
Nature: Quiet
Posts: 236
Quote:
Originally Posted by Anthroyd View Post
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.
__________________
Reply With Quote
  #12   Link to this post, but load the entire thread.  
Old June 24th, 2016 (4:13 PM).
Anthroyd's Avatar
Anthroyd Anthroyd is offline
Professor
 
Join Date: May 2016
Location: United States
Gender: Male
Posts: 210
Quote:
Originally Posted by Squeetz View Post
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!
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 9:08 AM.