ShadowFiendZX
Gym Leader
- 59
- Posts
- 12
- Years
- Age 28
- Hamden Connecticut
- Seen Jul 4, 2015
I've got a few questions about scripting, I'm not very comfortable with Ruby yet, so if there are simple answers, please forgive my ignorance.
First off, I made an item that can be used that has a few functions. When used, a text box pops up and you get a choice. After some searching, I got the text box to have my windowskin, but I also want the choice box to use the windowskin as well, how would I do this? As a sidenote, this is all done in a new script section that is separate from everything.
Here's how the dialogue is shown,
I want the whole thing to have the windowskin that's on the bottom of the screen. Obviously putting the \\w[iiddskin] in the command part did nothing.
My second question is, when I use "pbDownloadToString" it takes multiple tries to have a successful download, I'm not sure if it's the code or just my computer, although my friends also had the issue. Does anybody know of a way to fix this, or if it's just a given?
My third "question" is I decided I wanted the trainer card to have a back, so what I did was I made a new script section with a modified copy of the original trainer card script, the original trainer card script now has a bit of code that says:
and the trainer card back has a bit of code that says
Basically, what I want to happen is, when you press C on the front, the back shows, when you press C or X on the back, it returns to the front, and when you press X on the front, it goes back to the pause menu. What actually happens is, The back shows fine, and goes back to the front fine, but pressing X while viewing the front of the card after viewing the back at least once will unpause the game, but leave the trainer card in the view, you can walk and interact, and text will overlay the trainer card, after spamming X for a few seconds, the trainer card disappears. Can somebody tell me how to fix that?
First off, I made an item that can be used that has a few functions. When used, a text box pops up and you get a choice. After some searching, I got the text box to have my windowskin, but I also want the choice box to use the windowskin as well, how would I do this? As a sidenote, this is all done in a new script section that is separate from everything.
Here's how the dialogue is shown,
Code:
commands=[_INTL("Download information"),_INTL("View storage"),_INTL("Go online"),_INTL("View Daycare"),_INTL("Nothing")]
choice=Kernel.pbMessage(_INTL("\\w[iiddskin]What do you want to do?"),commands)
![[PokeCommunity.com] A few scripting questions [PokeCommunity.com] A few scripting questions](https://i.imgur.com/cd2jlRQ.png)
My second question is, when I use "pbDownloadToString" it takes multiple tries to have a successful download, I'm not sure if it's the code or just my computer, although my friends also had the issue. Does anybody know of a way to fix this, or if it's just a given?
My third "question" is I decided I wanted the trainer card to have a back, so what I did was I made a new script section with a modified copy of the original trainer card script, the original trainer card script now has a bit of code that says:
Code:
def pbTrainerCard
loop do
Graphics.update
Input.update
self.update
if Input.trigger?(Input::C)
scene=PokemonTrainerCardBackScene.new
screen=PokemonTrainerCardBack.new(scene)
pbFadeOutIn(99999) {
screen.pbStartScreen
@scene.pbRefresh
}
elsif Input.trigger?(Input::B)
pbEndScene
break
end
end
end
and the trainer card back has a bit of code that says
Code:
if Input.trigger?(Input::C)
break
elsif Input.trigger?(Input::B)
break
end
end
end
Last edited: