Go Back   The PokéCommunity Forums > Creative Discussions > Game Development > Pokémon Essentials
Reload this Page [Question] Another quick Scripting question

Notices
For all updates, view the main page.

Pokémon Essentials All questions and discussion about Pokémon Essentials, the Pokémon game kit for RPG Maker XP, go in here. Also contains links to the latest downloads and the Essentials Wiki.



Reply
 
Thread Tools
  #1    
Old March 26th, 2013 (04:49 PM).
Rayd12smitty's Avatar
Rayd12smitty Rayd12smitty is offline
Shadow Maker
 
Join Date: Dec 2011
Gender: Male
Posts: 647
Sorry for another stupid question I am still new to this.

When coding, what do I use to make a choice/options box. Like in an event when you use "Show Choices"? Also, how do I call a common event from a script.

Thanks
__________________
Reply With Quote
  #2    
Old March 26th, 2013 (10:47 PM).
jim42's Avatar
jim42 jim42 is offline
 
Join Date: Jul 2009
Gender: Male
Posts: 185
Look up textbox commands in the wiki, I believe there is something like /ch that spawns a dialog box for those.
Reply With Quote
  #3    
Old March 27th, 2013 (09:25 AM).
Maruno's Avatar
Maruno Maruno is offline
Lead Dev of Pokémon Essentials
Moderator
 
Join Date: Jan 2008
Location: England
Posts: 4,408
As jim42 said, if you're evening, then you can either use the standard choices event command or /ch for more than 4 options.

If you're scripting, then you can probably use this:

Code:
command=Kernel.pbMessage(_INTL("Make your choice."),[_INTL("Option 1"),_INTL("Option 2"),_INTL("Option 3")],0)
Choosing Option 1 returns the number 0, Option 2 returns the number 1, etc.

The red number is the "choice if cancelled" value (default 0 which means can't cancel). -1 means it will return -1 if cancelled, 1 means it will return 0 ("Option 1"), 2 means it will return 1 ("Option 2"), etc.

There are a couple more parameters for Kernel.pbMessage, which are in order: text skin for the message box, and default command (0=Option 1, 1=Option 2, etc.).
__________________
Reply With Quote
  #4    
Old March 27th, 2013 (01:45 PM).
Rayd12smitty's Avatar
Rayd12smitty Rayd12smitty is offline
Shadow Maker
 
Join Date: Dec 2011
Gender: Male
Posts: 647
Thanks Maruno thats what I was looking for. And how do I change where the choice box shows up? I want it on the left instead of right.
__________________
Reply With Quote
  #5    
Old March 27th, 2013 (05:48 PM).
Maruno's Avatar
Maruno Maruno is offline
Lead Dev of Pokémon Essentials
Moderator
 
Join Date: Jan 2008
Location: England
Posts: 4,408
If you want nearly every single choice box in the game to be on the left rather than the right, then go to PokemonMessages line 914 and change the red part to something obvious:

Code:
pbPositionNearMsgWindow(cmdwindow,msgwindow,:right)
This doesn't apply to some screens, i.e. the ones that have their own def pbShowCommands like the Bag and the party screen. It's up to you to decide whether it's worth it. I couldn't list which choice boxes would be affected, because there are several ways of calling the scripts which the above change would affect.

Otherwise, there's no way to change its position.
__________________
Reply With Quote
  #6    
Old March 27th, 2013 (07:15 PM).
Rayd12smitty's Avatar
Rayd12smitty Rayd12smitty is offline
Shadow Maker
 
Join Date: Dec 2011
Gender: Male
Posts: 647
Quote originally posted by Maruno:
If you want nearly every single choice box in the game to be on the left rather than the right, then go to PokemonMessages line 914 and change the red part to something obvious:

Code:
pbPositionNearMsgWindow(cmdwindow,msgwindow,:right)
This doesn't apply to some screens, i.e. the ones that have their own def pbShowCommands like the Bag and the party screen. It's up to you to decide whether it's worth it. I couldn't list which choice boxes would be affected, because there are several ways of calling the scripts which the above change would affect.

Otherwise, there's no way to change its position.
Oh if theres no way to change just this one i can work around it. Thanks again
__________________
Reply With Quote
Reply
Quick Reply

Sponsored Links

You may also like.. (Beta)
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 UTC -8. The time now is 10:04 PM.