The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Creative Discussions > Game Development > Scripts & Tutorials
Sign Up Rules/FAQ Live Battle 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    
Old April 29th, 2013, 05:32 PM
Rayd12smitty's Avatar
Rayd12smitty
Shadow Maker
 
Join Date: Dec 2011
Gender: Male
Hey guys. So Thanks to thor348 I figured out how to do something that has been bugging a LOT of people. How to Animate the Title Screen! I've seen many posts asking how you can use a .gif or multiple frames in a loop as a title screen instead of a static image. I found out how (It was actually really simple XD) Anyway here we go.


Tutorial by Rayd12smitty using Pokemon Essentials Version 11

The Images
First, you need your new title screen. No .gif images here! You need all your images as frames, one for each frame in the game (Unless you want to mess around with the timer) There are 20 frames in one second, so you may have a LOT of images. Thats alright though. Name your images
Splash_1, Splash_2, Splash_3, etc. Put them in a folder Called Splash inside your game folder in Graphics/Titles. I recommend over 100 frames, even if they are just duplicates. I have 40 different frames, but 3 or 4 of each one in a row so it doesn't move so fast. This brings the total to 120 or 160 depending on how fast I want it. It takes a while to name all the images but it needs to be done.

The Script
Alright. The script we are dealing with is Scene_Intro. This is the scene that loads the start screen (The black screen with Pokemon Essentials creators on it) and the Title screen. Open the script and go to line 50. It should say
Code:
@pic.name="Graphics/Titles/"+@splash
Directly ABOVE it, add the line
Code:
@Animation = 1
This sets the title screen's frame to 1.

Then REPLACE the line that is now line 51 which says
Code:
@pic.name="Graphics/Titles/"+@splash
with
Code:
@pic.name="Graphics/Titles/Splash/Splash_#{@Animation}"
This will change where the images are found and makes it so the images name depends on the variable we created (@Animation)

Halfway done. Now find the line that says
Code:
@timer=0 if @timer>=80
it should be around line 62. AFTER this line add
Code:
@Animation+=1 if @Animation<ZZZ
    @Animation = 1 if @Animation==ZZZ
    @pic.name="Graphics/Titles/Splash/Splash_#{@Animation}"
This adds 1 to the variable @Animation every frame and once it reaches a certain number resets it to 1. It also updates what image is being shown depending on the variable @Animation.

Replace ZZZ with how many frames your title screen has. If you have 160 images in the folder Graphics/Title/Splash, this number is 160. If you have 40 frames, this number is 40. Simple right?

Thats should do it :D Now your title screen acts animated, not static. Below I will explain one more little change to the title screen to help your game.

The Cry
If you've played your game or any other Pokemon Essentials game, you know that a random pokemon's cry is played when the "Enter" button is pressed. But your game might be about Rayquaza, you don't want a random Wynaut screaming when the player hits start! This is a real simple fix. Once again in the script Scene_Intro search for
Code:
cry=sprintf("%03dCry",1+rand(PBSpecies.maxValue))
    pbSEPlay(cry,100,100)
and replace it with
Code:
pbSEPlay('ZZZCry',100,100)
where ZZZ is the national dex number of the pokemon who's cry you want played.
There are 2 places in the script where these lines are found. Do this to both

Please Read
Thats all. Thanks for reading through this and I hope you found it helpful. If you use the animated title screen edits, please give me credit Rayd12smitty. I don't require credit for the cry played. Please comment with any questions/errors (Although there shouldn't be errors if you followed the directions right)


Example (Mine don't use)
__________________

Last edited by Rayd12smitty; April 29th, 2013 at 07:43 PM.
Reply With Quote
  #2    
Old April 29th, 2013, 05:40 PM
ppooookkkkkkk
Banned
 
Join Date: May 2012
Location: Newbud town (Pokemon Morning/Night)
Age: 13
Gender: Male
Nature: Gentle
I love all your tutorials (as well as carmaniacs).
This tutorial hopefully will make my game more attractive thank you.
Reply With Quote
  #3    
Old April 29th, 2013, 05:59 PM
Rayd12smitty's Avatar
Rayd12smitty
Shadow Maker
 
Join Date: Dec 2011
Gender: Male
Quote:
Originally Posted by ppooookkkkkkk View Post
I love all your tutorials (as well as carmaniacs).
This tutorial hopefully will make my game more attractive thank you.
I've only made 2 or 3 XD Thanks so much though it means a lot. Carmaniac actually taught me just about every thing I know about scripting.
__________________
Reply With Quote
  #4    
Old April 29th, 2013, 09:41 PM
KingCharizard's Avatar
KingCharizard
C++ Developer Extraordinaire
 
Join Date: Dec 2009
Location: Pennsylvania
Age: 25
Gender: Male
Nature: Bold
Quote:
Originally Posted by Rayd12smitty View Post
I've only made 2 or 3 XD Thanks so much though it means a lot. Carmaniac actually taught me just about every thing I know about scripting.
Thats interesting, I remember when carmaniac wasnt that good with scripting himself but nice tut, I do think it would be easier to just use .gif but this way works too
__________________
My personal website. UPDATED 8/29/2013
Reply With Quote
  #5    
Old April 30th, 2013, 03:42 AM
Rayd12smitty's Avatar
Rayd12smitty
Shadow Maker
 
Join Date: Dec 2011
Gender: Male
Quote:
Originally Posted by KingCharizard View Post
Thats interesting, I remember when carmaniac wasnt that good with scripting himself but nice tut, I do think it would be easier to just use .gif but this way works too
.gifs don't work. That's why I made this. When you try using a .gif for a splash screen it just shows the first frame and never animates.
__________________
Reply With Quote
  #6    
Old April 30th, 2013, 05:19 AM
Luka S.J.'s Avatar
Luka S.J.
S.J.Ware HD
 
Join Date: Dec 2008
Age: 21
Gender: Male
Nature: Adamant
Quote:
Originally Posted by Rayd12smitty View Post
.gifs don't work. That's why I made this. When you try using a .gif for a splash screen it just shows the first frame and never animates.
GIFs could have worked if you changed the variable of the splash sprite to be using the class GifSprite instead of PictureEx, and then just set a @pic.update in the def updateSplash. Just sayin'...

Quote:
Originally Posted by KingCharizard View Post
Thats interesting, I remember when carmaniac wasnt that good with scripting himself
Ryan has come a long way in a small period of time. He was really dedicated to improving his skills, both in coding and spriting.
__________________
[STOPPED][DEMO] Pokemon Blue Chrome
[DEVELOPING] S.J.Ware
[DEVELOPING] Tykanite
Reply With Quote
  #7    
Old April 30th, 2013, 07:57 AM
KingCharizard's Avatar
KingCharizard
C++ Developer Extraordinaire
 
Join Date: Dec 2009
Location: Pennsylvania
Age: 25
Gender: Male
Nature: Bold
Quote:
Originally Posted by Luka S.J. View Post
GIFs could have worked if you changed the variable of the splash sprite to be using the class GifSprite instead of PictureEx, and then just set a @pic.update in the def updateSplash. Just sayin'...



Ryan has come a long way in a small period of time. He was really dedicated to improving his skills, both in coding and spriting.

Yea Luka is right, if you modify the code like you did with the above method you could easily use .gifs

Oh, snap first name basis.. it just got serious.. Yea i know I've been seeing his posts havent talked to him lately since they got rid of MSN
__________________
My personal website. UPDATED 8/29/2013
Reply With Quote
  #8    
Old April 30th, 2013, 09:05 AM
thor348's Avatar
thor348
That's Oak to You
 
Join Date: Nov 2012
Location: Albion
Gender: Male
Nature: Calm
Quote:
Originally Posted by Luka S.J. View Post
GIFs could have worked if you changed the variable of the splash sprite to be using the class GifSprite instead of PictureEx, and then just set a @pic.update in the def updateSplash. Just sayin'...
Ahh yes. That does work. Very sorry Rayd12smitty for providing a more difficult way to do it
Reply With Quote
  #9    
Old April 30th, 2013, 03:52 PM
Rayd12smitty's Avatar
Rayd12smitty
Shadow Maker
 
Join Date: Dec 2011
Gender: Male
I kind of meant gifs wouldn't work without script edits. Either way it's working and some people may prefer this method.
__________________

Last edited by Rayd12smitty; April 30th, 2013 at 06:43 PM.
Reply With Quote
  #10    
Old April 30th, 2013, 07:01 PM
KingCharizard's Avatar
KingCharizard
C++ Developer Extraordinaire
 
Join Date: Dec 2009
Location: Pennsylvania
Age: 25
Gender: Male
Nature: Bold
Quote:
Originally Posted by Rayd12smitty View Post
I kind of meant gifs wouldn't work without script edits. Either way it's working and some people may prefer this method.
isnt your way editing a script as well? There is nothing against your method it just is gonna take a little bit more work than the .gif method. but your right some people may prefer this way opposed to the other way. to each their own...

anyways nice tutorial overall, very clear and precise with the instructions.. I like your style, looking forward to seeing more from you.
__________________
My personal website. UPDATED 8/29/2013
Reply With Quote
  #11    
Old May 1st, 2013, 01:44 AM
Pharetra's Avatar
Pharetra
MOM GET THE CAMERA
 
Join Date: Jun 2011
Age: 18
Gender: Male
Quote:
Originally Posted by thor348 View Post
Ahh yes. That does work. Very sorry Rayd12smitty for providing a more difficult way to do it
Don't worry, your way has it's own advantages. You won't be restricted to 252 colours for example, which is something I really like ;)

Thanks for the tutorial :)
__________________
Reply With Quote
  #12    
Old May 2nd, 2013, 04:26 AM
Peeky Chew's Avatar
Peeky Chew
Master of Palettes
 
Join Date: Sep 2009
Location: Great Britain
Age: 20
Gender: Male
Can someone please explain what exactly you have to change about smitty's script to make it work with .GIFs?
__________________



Demo Beta out Now!

Reply With Quote
  #13    
Old May 7th, 2013, 07:38 AM
tylerab01's Avatar
tylerab01
Pokemon AquaHarmony
 
Join Date: Apr 2009
Location: France
Gender: Male
Nature: Bold
Quote:
Originally Posted by Peeky Chew View Post
Can someone please explain what exactly you have to change about smitty's script to make it work with .GIFs?
I believe this will work, but Luka knows better than I.

@viewport=Viewport.new(0,0,GRAPHICSHEIGHT,GRAPHICSWIDTH)
@sprites["Pic"]=GifSprite.new (@viewport)
@sprites["Pic"].bitmap=BitmapCache.load_bitmap("PATH TO PICTURE")


I set my own viewports so you will have to check the Settings Script of Essentials.

-AvD
__________________

Reply With Quote
  #14    
Old December 2nd, 2013, 10:24 PM
CrazyClyde's Avatar
CrazyClyde
 
Join Date: Oct 2013
Location: Bay Area, California
Gender: Male
Nature: Jolly
For some reason, when I did all the scripts for the cry at the end. an error came up, and it said, "Script 'Scene_Intro' line 111: SyntaxError occured,". Any idea? I didn't even mess with that line..
Reply With Quote
  #15    
Old December 3rd, 2013, 07:04 PM
WinterKirby's Avatar
WinterKirby
 
Join Date: Dec 2012
Age: 2
Gender: Male
Nature: Mild
Quote:
Originally Posted by CrazyClyde View Post
For some reason, when I did all the scripts for the cry at the end. an error came up, and it said, "Script 'Scene_Intro' line 111: SyntaxError occured,". Any idea? I didn't even mess with that line..
What do you have on line 111?
__________________
X/Y Friend Code: 1349-5852-1728 | Pinkie | Flying | Hoot-Hoot, Pidgey, and Tropius

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 12:16 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.