The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script Trouble with script tiles/vars

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 April 19th, 2017 (9:30 AM).
Bygix Bygix is offline
 
Join Date: Jul 2014
Gender: Male
Posts: 5
Hey guys, so Im having a hard time with script tiles and I was wondering if I could get some help. Im not sure what Im doing wrong here, Ive read diegoisawesome's scripting tutorial and done some of my own personal research about script tiles as well. For the longest time I couldnt even get this script to activate. Now Ive gotten it to activate, but it always goes to the portion of the script that only activates if the flag is set to 0. I know the script to set the flag is working (at least Im pretty sure it is) so Im not sure whats going wrong here. Any help would be really appreciated, Ive been reading up on scripting and asm for awhile now so I am not tech illiterate or just looking for someone to write scripts for me! I wanna do this stuff myself, I just need a little help along the way.

#dynamic 0x900000

#org @firstencounter
setvar 0x401B 0x2
goto @Davhello

#org @Davhello
msgbox @Hey 0x6
checkflag 0x862
if 0x0 goto @Davlater
compare 0x4112 0x1
if 0x1 goto @through
compare 0x4112 0x2
if 0x1 goto @rival1
compare 0x4112 0x3
if 0x1 goto @rival2
compare 0x4112 0x4
if 0x1 goto @rival3
compare 0x4112 0x5
if 0x1 goto @rival4
compare 0x4112 0x6
if 0x1 goto @rival5
compare 0x4112 0x7
if 0x1 goto @rival6
checkflag 0x863

#org @Hey
= Hey!

#org @Davlater
lock
msgbox @grandmapknv 0x6
setvar 0x401B 0x0
release
end

#org @grandmapknv
= Hey *trainer name*, whats up? ...\nyou dont remember me? Its me,\lPhiladelphia Collins! ... just\lkidding, Im your neighbor Dav! I\lheard you just got your first\lpokemon, we should battle! ... oh\lwait, you dont have a pokedex\lyet... I just got mine from my\lparents, maybe your grandma has\lone?

#org @through
msgbox @Davbattle1 0x6
applymovement 0xFF @slide
waitmovement 0x0
applymovement 0x02 @partialwalk
waitmovement 0x0
applymovement 0x02 @Leadtrainer1
applymovement 0xFF @Followdav1
waitmovement 0x0
goto @firstbattle

#org @Davbattle1
= Whats up *traner name*? ... you\ndont remember me? Its me,\lPhiladelphia Collins! ...just\lkidding, Im your neighbor Dav! I\lheard you just got your first\lpokemon, we should battel! Follow\lme!

#org @firstbattle
msgbox @letsgo 0x6
trainerbattle 0x0 0x001 0x0 @before @after
msgbox @beaten 0x6
setvar 0x401B 0x8
release
end

#org @letsgo
= This is the battle field my\nparents just had built for me.\lPretty cool right? Im gonna train\lhere so I can challenge the\lpokemon league....you wanna\lchallenge the pokemon league too?\lThats awesome! Alright then, lets\lstart our training right now!

#org @before
= Alright, me and my buddy/n are gonna win this!

#org @after
= Not bad, not bad!

#org @beaten
= That was surprising, I really\ndidint expect me and Cubone to\llose. That was fun though! Ya\lwanna be rivals from here on out?\lAwesome! Should be a good time!\lIm gonna go explore route 2 and\lgrab some pokemon. See you around!

#org @slide
#raw 0x2C

#org @partialwalk
#raw 0x1D

#org @leadtrainer1
#raw 0x1D
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0x20
#raw 0x20
#raw 0x02

#org @followdav1
#raw 0x1F
#raw 0x1D
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0x1E
#raw 0x03

#org @rival1
applymovement 0xFF @step1
waitmovement 0x0
goto @through

#org @rival2
applymovement 0xFF @step2
waitmovement 0x0
goto @through

#org @rival3
applymovement 0xFF @step3
waitmovement 0x0
goto @through

#org @rival4
applymovement 0xFF @step4
waitmovement 0x0
goto @through

#org @rival5
applymovement 0xFF @step5
waitmovement 0x0
goto @through

#org @rival6
applymovement 0xFF @step6
waitmovement 0x0
goto @through

#org @step1
#raw 0x20
#raw 0x01
return

#org @step2
#raw 0x20
#raw 0x20
#raw 0x01
return

#org @step3
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x01
return

#org @step4
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x01
return

#org @step5
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x01
return

#org @step6
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x01
return
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:17 AM.