The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Creative Discussions > Game Development > Pokémon Essentials
Register New Account FAQ/Rules Chat Blogs Mark Forums Read

Notices

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  
Unread January 15th, 2013, 01:58 PM
Krepusko
Unhatched Egg
 
Join Date: Aug 2012
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?

Last edited by Krepusko; January 18th, 2013 at 09:14 PM.
Reply With Quote
Reply
Quick Reply

Sponsored Links


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. The time now is 01:58 PM.


Style by Perdition Haze, artwork by Sa-Dui.
Like our Facebook Page Follow us on TwitterMessage Board Statistics | © 2002 - 2013 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to Pokémon USA, Inc. and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company, Pokémon USA, Inc., The Pokémon Company International, or Wizards of the Coast. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2013 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User posts belong to the user.