Go Back   The PokéCommunity Forums > Creative Discussions > Game Development > Pokémon Essentials
Reload this Page [Question] Some questions about scene and screen

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 January 15th, 2013 (05:58 AM). Edited January 18th, 2013 by Krepusko.
Krepusko Krepusko is offline
 
Join Date: Aug 2012
Posts: 1
Hello Community,

I am trying to script a little 2-Player mode in Pokemon Essentials, but i don't understand the variables scene and screen. This lack of understanding gives me the following 2 problems:
1. In order to change the team, I made an option to call "Bill's PC", but after leaving it, the game crashes.
2. I don't know how to start the battle screen.
Furthermore it is necessary to mention, that I am not implementing this function to use it from a map, but as an option right under "New Game", which replaces "Continue","New Game","Options" with "Host Game","Join Game","Edit Team", "Back".
Can you help me out, please?
It would really help me, because the Server and Clients seem to work (some problems with windows 7 but not with Ubuntu) and I would like to continue scripting.

Thank you for your help.

Edit:
Now that I am finaly back on my machine, I can post the line, I suspect to solve problem 2:
@scene.pbStartBattle(self)

It is line 666 in the PokeBattle_Battle script. What I am trying out now is to copy the 2 methods (pbStartBattle and pbStartBattleCore) to the PokemonLoad script, where I define the variables in pbStartBattleCore with the ones reading from the savefile. Don't know, if this will work.

Edit2:
I got the following lines for a random enemy in order to test:
Spoiler:
@party1=$Trainer.party
trainer=pbLoadTrainer(PBTrainers::TEAMMAGMA_Male,"Grunt",0)
@party2=trainer[2]
scene=pbNewBattleScene
battle=PokeBattle_Battle.new(scene,@party1,@party2,$Trainer,trainer[0])
Events.onStartBattle.trigger(nil,nil)
battle.internalbattle=true
pbPrepareBattle(battle)
decision=0
trainerbgm=pbGetTrainerBattleBGM(trainer[0])
pbBattleAnimation(trainerbgm) {
pbSceneStandby {
decision=battle.pbStartBattle
}
if $PokemonGlobal.partner
for i in $Trainer.party; i.heal; end
end
if decision==2 || decision==5
if canlose
for i in $Trainer.party; i.heal; end
for i in 0...10
Graphics.update
end
else
$game_system.bgm_unpause
$game_system.bgs_unpause
Kernel.pbStartOver
end
end
Events.onEndBattle.trigger(nil,decision)
}

Problem is, that it takes 16 seconds to start the battle and the game crashes after the battle is over, which is not unexpected. Can you tell me, how I can fix the crashs?
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 09:38 AM.