The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script Script Tile keeps activating randomly

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 March 4th, 2021 (5:40 AM).
AJaxs AJaxs is offline
 
Join Date: Oct 2020
Posts: 15
Hello guys and girls.
My Problem is that i wrote a Script Tile but it does't activate correctly.
One can step on it multiple times and nothing happens or it through sheer luck
it activates.
Also even if it was activated and the var set to 1 it can still activate again.
I don't really know why this happens.
I will post the script ,maybe I forgot something there.
Any help will be appreciated.🙂


SCRIPT:

#dynamic 0x800000
#org @start
lock
faceplayer

spriteface 0x6 0x1
spriteface 0xFF 0x2
applymovement 0x6 @m1
waitmovement 0x0
msgbox @talk 0x6

msgbox @t1 0x6
applymovement 0x6 @m2
waitmovement 0x0
hidesprite 0x6
setflag 0x242
hidesprite 0x6
setvar 0x4022 0x1

release
end

#org @talk
= Hello, [PLAYER]!\nHow are you doing?

#org @t1
= I just came to say my Prayers for\nall the fallen POKéMON here.\lIt reminds me of the BELL TOWER in\lJOHTO where 3 POKéMON fell\ltragically.\pWell anyway, have a nice day.\nBye!


'-----------
' Movements
'-----------
#org @m1
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0xFE

#org @m2
#raw 0x13
#raw 0x10
#raw 0x10
#raw 0x12
#raw 0x10
#raw 0xFE 'End of Movements
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old March 4th, 2021 (9:41 AM).
mcferaligatr's Avatar
mcferaligatr mcferaligatr is offline
 
Join Date: Nov 2018
Posts: 120
Quote:
Originally Posted by AJaxs View Post
Hello guys and girls.
My Problem is that i wrote a Script Tile but it does't activate correctly.
One can step on it multiple times and nothing happens or it through sheer luck
it activates.
Also even if it was activated and the var set to 1 it can still activate again.
I don't really know why this happens.
I will post the script ,maybe I forgot something there.
Any help will be appreciated.🙂


SCRIPT:

#dynamic 0x800000
#org @start
lock
faceplayer

spriteface 0x6 0x1
spriteface 0xFF 0x2
applymovement 0x6 @m1
waitmovement 0x0
msgbox @talk 0x6

msgbox @t1 0x6
applymovement 0x6 @m2
waitmovement 0x0
hidesprite 0x6
setflag 0x242
hidesprite 0x6
setvar 0x4022 0x1

release
end

#org @talk
= Hello, [PLAYER]!\nHow are you doing?

#org @t1
= I just came to say my Prayers for\nall the fallen POKéMON here.\lIt reminds me of the BELL TOWER in\lJOHTO where 3 POKéMON fell\ltragically.\pWell anyway, have a nice day.\nBye!


'-----------
' Movements
'-----------
#org @m1
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0xFE

#org @m2
#raw 0x13
#raw 0x10
#raw 0x10
#raw 0x12
#raw 0x10
#raw 0xFE 'End of Movements
This is most likely happening because of var 4022. Vars from 4020 to 4024 have something to do with keeping repel values, so you should use a var other than those and the script should work properly.
__________________
Pokemon NeonBlue:
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old March 6th, 2021 (3:04 AM).
AJaxs AJaxs is offline
 
Join Date: Oct 2020
Posts: 15
ahhh,Thanks man.😄
This also explains why I get a "Repel wore of" Text message for another script.😂
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
Thread Tools

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:19 AM.