The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Creative Discussions > Game Development > Pokémon Essentials
Sign Up Rules/FAQ Live Battle 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    
Old January 14th, 2013, 04:27 AM
14sz's Avatar
14sz
 
Join Date: Aug 2012
Location: India
Gender: Male
Hello does anyone have a working link to rafael-animals Pokemon essentials bw 0.5? cause I have 0.1, and it starts and then crashes. Can anyone suggest a fix for it. Please, I am new to scripting
Reply With Quote
  #2    
Old January 15th, 2013, 04:22 AM
14sz's Avatar
14sz
 
Join Date: Aug 2012
Location: India
Gender: Male
I managed to start it and now in pokebattle_actualscene this is giving me trouble. In battle, i can only click on first move, not on others or cancel. Please help.

==================================
def pbFightMenu(index)
#pbShowWindow(FIGHTBOX)
@ret=0
moves=@battle.battlers[index].moves
types=[
MoveType(moves[0]),
MoveType(moves[1]),
MoveType(moves[2]),
MoveType(moves[3])
]
movenames=[
MoveName(moves[0]),
MoveName(moves[1]),
MoveName(moves[2]),
MoveName(moves[3])
]
movepp=[
MovePP(moves[0]),
MovePP(moves[1]),
MovePP(moves[2]),
MovePP(moves[3])
]
move1 = Window_UnformattedTextPokemon.new(movenames[0].to_s)
#move1.baseColor = Color.new(248,248,248)
#move1.shadowColor = Color.new(104,88,112)
move1.x=34+68-6-64
move1.y=458+20-$ResizeOffsetY-20
move1.opacity = 0
move1.z=99999
move1.baseColor=Color.new(255,255,255)

move2 = Window_UnformattedTextPokemon.new(movenames[1].to_s)
move2.x=288+68-8-64
move2.y=458+20-$ResizeOffsetY-20
move2.opacity = 0
move2.z=99999
move2.baseColor=Color.new(255,255,255)

move3 = Window_UnformattedTextPokemon.new(movenames[2].to_s)
move3.x=34+75-14-64
move3.y=591-14-$ResizeOffsetY-20
move3.opacity = 0
move3.z=99999
move3.baseColor=Color.new(255,255,255)

move4 = Window_UnformattedTextPokemon.new(movenames[3].to_s)
move4.x=288+75-14-64
move4.y=591-14-$ResizeOffsetY-20
move4.opacity = 0
move4.z=99999
move4.baseColor=Color.new(255,255,255)

pp1 = Window_UnformattedTextPokemon.new(movepp[0].to_s)
pp1.x=100+75-64
pp1.y=490+26-$ResizeOffsetY-20
pp1.opacity = 0
pp1.z=99999
pp1.baseColor=Color.new(255,255,255)

pp2 = Window_UnformattedTextPokemon.new(movepp[1].to_s)
pp2.x=357+75-64
pp2.y=490+26-$ResizeOffsetY-20
pp2.opacity = 0
pp2.z=99999
pp2.baseColor=Color.new(255,255,255)

pp3 = Window_UnformattedTextPokemon.new(movepp[2].to_s)
pp3.x=100+75-64
pp3.y=614-$ResizeOffsetY-20
pp3.opacity = 0
pp3.z=99999
pp3.baseColor=Color.new(255,255,255)

pp4 = Window_UnformattedTextPokemon.new(movepp[3].to_s)
pp4.x=357+75-64
pp4.y=614-$ResizeOffsetY-20
pp4.opacity = 0
pp4.z=99999
pp4.baseColor=Color.new(255,255,255)

@movesprites={}
@movesprites["move1"]=IconSprite.new(4+75-80, 480-18,@viewport)
@movesprites["move1"].setBitmap("Graphics/Pictures/move_" + types[0].to_s)
@movesprites["move1"].z=999999991

@movesprites["move2"]=IconSprite.new(260+75-80, 480-18,@viewport)
@movesprites["move2"].setBitmap("Graphics/Pictures/move_" + types[1].to_s)
@movesprites["move2"].z=999999991

@movesprites["move3"]=IconSprite.new(4+75-80, 578-18,@viewport)
@movesprites["move3"].setBitmap("Graphics/Pictures/move_" + types[2].to_s)
@movesprites["move3"].z=999999991

@movesprites["move4"]=IconSprite.new(260+75-80, 578-18,@viewport)
@movesprites["move4"].setBitmap("Graphics/Pictures/move_" + types[3].to_s)
@movesprites["move4"].z=999999991

@movesprites["cancel"]=IconSprite.new(18, 706)
@movesprites["cancel"].setBitmap("Graphics/Pictures/botoncancelar")
@movesprites["cancel"].z=999999
cw = @sprites["fightwindow"]
battler=@battle.battlers[index]
cw.battler=battler
lastIndex=@lastmove[index]
if battler.moves[lastIndex].id!=0
cw.setIndex(lastIndex)
else
cw.setIndex(0)
end
#pbSelectBattler(index)
pbRefresh
loop do
$mouse.visible
$mouse.update
pbGraphicsUpdate
pbInputUpdate
#pbFrameUpdate(cw)

if Input.trigger?(Input::B)
pbPlayCancelSE()
Graphics.wait(2)
pbDisposeSpriteHash(@movesprites)
move1.dispose
move2.dispose
move3.dispose
move4.dispose
@pokemonno.dispose if @pokemonno
pp1.dispose
pp2.dispose
pp3.dispose
pp4.dispose
@lastmove[index]=cw.index
return -1
end

if @battle.battlers[index].moves[0].id != 0

if pbMouseClickImage?(@movesprites["move1"])
@command=0
@ret=1
end
elsif @battle.battlers[index].moves[1].id != 0
if pbMouseClickImage?(@movesprites["move2"])
@command=1
@ret=1
end
elsif @battle.battlers[index].moves[2].id != 0
if pbMouseClickImage?(@movesprites["move3"])
@command=2
@ret=1
end
elsif @battle.battlers[index].moves[3].id != 0
if pbMouseClickImage?(@movesprites["move4"])
@command=3
@ret=1
end

end
if @ret == 1
ret=@command
@sprites["battlebg2"].bitmap = RPG::Cache.picture("battleballbg")
pbDisposeSpriteHash(@movesprites)
move1.dispose
move2.dispose
move3.dispose
move4.dispose
pp1.dispose
pp2.dispose
pp3.dispose
pp4.dispose
pbPlayDecisionSE()
return ret
end
nextindex=pbNextIndex(cw.index)
if cw.index!=nextindex # Move cursor
pbPlayCursorSE()
cw.setIndex(nextindex)
end
end
end
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
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 11:55 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 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 generated content remains the property of its creator.