The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Creative Discussions > Game Development > Resources > Scripts & Tutorials
Register New Account FAQ/Rules Chat Blogs Mark Forums Read

Notices

Scripts & Tutorials This forum is for scripts and code, as well as all kinds of tutorials, software, tools and so forth. Remember to give credit!
The thread revival limit does not apply here.



Reply
Thread Tools
  #1  
Unread December 13th, 2010, 03:27 AM
zingzags's Avatar
zingzags
Creator or Pokemon Serenity
 
Join Date: Jan 2009
Location: Boston
Age: 19
Nature: Adamant
took about 10min to make....


Spoiler:
class SceneHoF

def pbUpdate
pbUpdateSpriteHash(@sprites)
end

def pbEndScene
pbDisposeSpriteHash(@sprites)
@viewport.dispose
end

#placement for pokemon icons
def pbStartScene
@sprites={}
@viewport=Viewport.new(0,0,Graphics.width, Graphics.height)
@viewport.z=99999
#/Battlers/firstframe//%03d
@sprites["bg"]=Sprite.new(@viewport)
@sprites["bg"].bitmap = BitmapCache.load_bitmap("Graphics/save/saveBG")
@sprites["bg"].x=0
@sprites["bg"].y=400#340
@sprites["bg"].z=999998

if $Trainer.party.length>=1
@pkm1=Sprite.new
@pkm1=AnimatedSprite.create(sprintf("Graphics/Battlers/firstframe/%03d",$Trainer.party[0].species),1,1)
@pkm1.x=49
@pkm1.y=587
@pkm1.z=999999
@pkm1.start
end

if $Trainer.party.length>=2
@pkm2=Sprite.new
@pkm2=AnimatedSprite.create(sprintf("Graphics/Battlers/firstframe/%03d",$Trainer.party[1].species),1,1)
@pkm2.x=100
@pkm2.y=587
@pkm2.z=999999
@pkm2.start
end

if $Trainer.party.length>=3
@pkm3=Sprite.new
@pkm3=AnimatedSprite.create(sprintf("Graphics/Battlers/firstframe/%03d",$Trainer.party[2].species),1,1)
@pkm3.x=151
@pkm3.y=587
@pkm3.z=999999
@pkm3.start
end

if $Trainer.party.length>=4
@pkm4=Sprite.new
@pkm4=AnimatedSprite.create(sprintf("Graphics/Battlers/firstframe/%03d",$Trainer.party[3].species),1,1)
@pkm4.x=202
@pkm4.y=@pkm1.y
@pkm4.z=999999
@pkm4.start
end

if $Trainer.party.length>=5
@pkm5=Sprite.new
@pkm5=AnimatedSprite.create(sprintf("Graphics/Battlers/firstframe/%03d",$Trainer.party[4].species),1,1)
@pkm5.x=253
@pkm5.y=@pkm1.y
@pkm5.z=999999
@pkm5.start
end

if $Trainer.party.length==6
@pkm6=Sprite.new
@pkm6=AnimatedSprite.create(sprintf("Graphics/Battlers/firstframe/%03d",$Trainer.party[5].species),1,1)
@pkm6.x=304
@pkm6.y=@pkm1.y
@pkm6.z=999999
@pkm6.start





end

end




def pbScene
loop do
Graphics.update
Input.update
pbUpdate


Kernel.pbMessage(_INTL("Congradulations, You guys are the Elite Four Victors!!!"))
Kernel.pbMessage(_INTL("You, and your team of pokemon, has collected all eight pokemon badges, and defeated the elite four...."))
Kernel.pbMessage(_INTL("This is a momentus day, is there anything you guys will like to say?"))



# to make an exit use break
end
end
end

class HoFScreen
def initialize(scene)
@scene = scene
end
def pbStartScreen
@scene.pbStartScene
@scene.pbScene
@scene.pbEndScene
end
end





This is a very simple HoF system, after beating the elite four, I doubt many of you will reach this far but what they hay, I doubt I will probably reach this far too....

Consider it my early Christmas to Planetdev, PC, and luka's forum......




Sorry I posted the other one in the tutorial section, if a mod see it can you please delete
__________________
Pokemon Serenity is my fangame name.
name decided 12/15/09
Currently helping:
Pokemon ebony
and
Xenotime:
Reply With Quote
  #2  
Unread December 14th, 2010, 05:37 AM
thepsynergist's Avatar
thepsynergist
A Gym Leader, Kyushu Region
 
Join Date: Mar 2009
Location: California, USA
Age: 23
Gender: Male
Nature: Adamant
Send a message via Yahoo to thepsynergist Send a message via Skype™ to thepsynergist
Can you use this on a one screen game? I don't want to use the duel screens.
__________________



http://www.planetdev.co.uk/topic.php?id=382
Reply With Quote
  #3  
Unread December 14th, 2010, 09:49 PM
KitsuneKouta's Avatar
KitsuneKouta
狐 康太
 
Join Date: Mar 2010
Age: 22
Gender: Male
Quote:
Originally Posted by thepsynergist View Post
Can you use this on a one screen game? I don't want to use the duel screens.
It works just fine with single screens. Just change the y values. Also, this script works with luka's animated battlers script, so if you aren't using it, you'll have to take firstframes out of the directory name for battler's images.

Also, it works nicely, and is simple enough that it can be edited and whatnot without having to worry messing things up. Good job. I did get an error when breaking the loop though. It looks for a "main" method that doesn't exist, and I haven't had time to actually look for the cause of it.
__________________
Creator of the Harvest Moon Tool Kit (HMTK).

Anime/Manga fans can find me on MyAnimeList.net, as KitsuneKouta.
Reply With Quote
  #4  
Unread December 14th, 2010, 10:35 PM
zingzags's Avatar
zingzags
Creator or Pokemon Serenity
 
Join Date: Jan 2009
Location: Boston
Age: 19
Nature: Adamant
Quote:
Originally Posted by KitsuneKouta View Post
It works just fine with single screens. Just change the y values. Also, this script works with luka's animated battlers script, so if you aren't using it, you'll have to take firstframes out of the directory name for battler's images.

Also, it works nicely, and is simple enough that it can be edited and whatnot without having to worry messing things up. Good job. I did get an error when breaking the loop though. It looks for a "main" method that doesn't exist, and I haven't had time to actually look for the cause of it.

Lol I purposely did not add the break, but yea it can be greatly expanded upon...
__________________
Pokemon Serenity is my fangame name.
name decided 12/15/09
Currently helping:
Pokemon ebony
and
Xenotime:
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 03:53 AM.


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.