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 August 24th, 2012, 02:31 AM
P-Sign's Avatar
P-Sign
Pokémon Nova Luna Lead Dev.
 
Join Date: Jun 2011
Location: The Netherlands
Age: 17
Gender: Male
I've made a nice (if I may say so) Title Screen with 96 frames and I'd like to use it. Problem is, it doesn't work. .Gif files won't work and I've tried renaming the file to splash.png (changing the extension) without succes.

What is the best way to do this? I do not have much knowledge of RGSS, so...
__________________

Reply With Quote
  #2    
Old August 24th, 2012, 08:42 AM
zingzags's Avatar
zingzags
Creator or Pokemon Serenity
 
Join Date: Jan 2009
Location: Boston
Age: 20
Nature: Adamant
Making an image for each 96 frames name them some thing like splash_1,_2,_3, and etc... then make a global variable it can be anything like
Code:
@splash=0
then once you start looping
Code:
 
@splash+=1
this makes it so it can play each frames
then
Code:
@splash=1 if @splash==96
once it hits 96 it starts the animation again from frame one.
when you are going to make the splash images show do something like this
Code:
("Graphics/Pictures/splash_"+@splash)
But gif images should work, when they are renamed to png.
__________________
Pokemon Serenity is my fangame name.
name decided 12/15/09
Currently helping:
Pokemon ebony
and
Xenotime:
Reply With Quote
  #3    
Old August 24th, 2012, 09:40 AM
P-Sign's Avatar
P-Sign
Pokémon Nova Luna Lead Dev.
 
Join Date: Jun 2011
Location: The Netherlands
Age: 17
Gender: Male
I suppose these lines of code have to be added to the script Intro_Scene?
I've got this so far:
Spoiler:

class IntroEventScene < EventScene
def initialize(pics,splash,viewport=nil)
super(nil)
@pics=pics
@splash=splash
@pic=addImage(0,0,"")
@pic.moveOpacity(0,0,0) # fade to opacity 0 in 0 frames after waiting 0 frames
@pic2=addImage(0,322,"") # flashing "Press Enter" picture
@pic2.moveOpacity(0,0,0)
@index=0
data_system = pbLoadRxData("Data/System")
pbBGMPlay(data_system.title_bgm)
openPic(self,nil)
end

def openPic(scene,args)
onCTrigger.clear
@pic.name="Graphics/Titles/"+@pics[@index]
@pic.moveOpacity(15,0,255) # fade to opacity 255 in 15 frames after waiting 0 frames
pictureWait
@timer=0 # reset the timer
onUpdate.set(method(:timer)) # call timer every frame
onCTrigger.set(method(:closePic)) # call closePic when C key is pressed
end

def timer(scene,args)
@timer+=1
if @timer>80
@timer=0
closePic(scene,args) # Close the picture
end
end

def closePic(scene,args)
onCTrigger.clear
onUpdate.clear
@pic.moveOpacity(15,0,0)
pictureWait
@index+=1 # Move to the next picture
if @index>=@pics.length
openSplash(scene,args)
else
openPic(scene,args)
end
end

#CHANGES HAVE BEEN MADE IN THIS DEF
def openSplash(scene,args)
onCTrigger.clear
onUpdate.clear
#Global variable for Animated Titlescreen
@splash=0
@pic.name=("Graphics/Pictures/splash_"+@splash)
@pic.moveOpacity(15,0,255)
@pic2.name="Graphics/Titles/start"
@pic2.moveOpacity(15,0,255)
pictureWait
onUpdate.set(method(:splashUpdate)) # call splashUpdate every frame
@splash+=1
@splash=1 if @splash==96
onCTrigger.set(method(:closeSplash)) # call closeSplash when C key is pressed
end
#END OF DEF. NO CHANGES FROM THIS POINT ON.

def splashUpdate(scene,args)
@timer+=1
@timer=0 if @timer>=80
if @timer>=32
@pic2.moveOpacity(0,0,8*(@timer-32))
else
@pic2.moveOpacity(0,0,255-(8*@timer))
end
if Input.press?(Input::DOWN) &&
Input.press?(Input::B) &&
Input.press?(Input::CTRL)
closeSplashDelete(scene,args)
end
end

def closeSplash(scene,args)
onCTrigger.clear
onUpdate.clear
@pic.moveOpacity(15,0,0)
@pic2.moveOpacity(15,0,0)
pictureWait
pbBGMStop()
scene.dispose # Close the scene
sscene=PokemonLoadScene.new
sscreen=PokemonLoad.new(sscene)
sscreen.pbStartLoadScreen
end

def closeSplashDelete(scene,args)
onCTrigger.clear
onUpdate.clear
@pic.moveOpacity(15,0,0)
pictureWait
pbBGMStop()
scene.dispose # Close the scene
sscene=PokemonLoadScene.new
sscreen=PokemonLoad.new(sscene)
sscreen.pbStartDeleteScreen
end
end



class Scene_Intro
def initialize(pics, splash = nil)
@pics=pics
@splash=splash
end

def main
Graphics.transition(0)
@eventscene=IntroEventScene.new(@pics,@splash)
@eventscene.main
Graphics.freeze
end
end

I get this error after starting the game:
Spoiler:

Script "Scene_Intro" line 52 ( @pic.name=("Graphics/Pictures/splash_"+@splash) ): TypeError occured. cannot convert Fixnum into String
__________________

Reply With Quote
  #4    
Old August 24th, 2012, 10:10 AM
venom12's Avatar
venom12
Pokemon Crystal Rain Relased
 
Join Date: Sep 2006
Age: 23
Gender: Male
Nature: Adamant
Send a message via Windows Live Messenger to venom12
I think it need to be
@pic.name=("Graphics/Pictures/splash_"+@splash+"")
__________________



Reply With Quote
  #5    
Old August 24th, 2012, 10:15 AM
P-Sign's Avatar
P-Sign
Pokémon Nova Luna Lead Dev.
 
Join Date: Jun 2011
Location: The Netherlands
Age: 17
Gender: Male
Quote:
Originally Posted by venom12 View Post
I think it need to be
@pic.name=("Graphics/Pictures/splash_"+@splash+"")
I get the same error, I'm afraid this doesn't work.

Thanks for your help though! (The same goes for zingzags.)
__________________

Reply With Quote
  #6    
Old August 24th, 2012, 11:09 AM
zingzags's Avatar
zingzags
Creator or Pokemon Serenity
 
Join Date: Jan 2009
Location: Boston
Age: 20
Nature: Adamant
The reason you are getting that error is because you are not suppose to call the image that way.
__________________
Pokemon Serenity is my fangame name.
name decided 12/15/09
Currently helping:
Pokemon ebony
and
Xenotime:
Reply With Quote
  #7    
Old August 24th, 2012, 12:02 PM
P-Sign's Avatar
P-Sign
Pokémon Nova Luna Lead Dev.
 
Join Date: Jun 2011
Location: The Netherlands
Age: 17
Gender: Male
Quote:
Originally Posted by zingzags View Post
The reason you are getting that error is because you are not suppose to call the image that way.
Okay, how am I supposed to call it then?
__________________

Reply With Quote
  #8    
Old August 26th, 2012, 11:48 AM
FL's Avatar
FL
Pokémon Island Creator
 
Join Date: Sep 2010
Gender: Male
Try: @pic.name=("Graphics/Pictures/splash_"+@splash.to_s)
__________________
Reply With Quote
  #9    
Old August 26th, 2012, 10:23 PM
P-Sign's Avatar
P-Sign
Pokémon Nova Luna Lead Dev.
 
Join Date: Jun 2011
Location: The Netherlands
Age: 17
Gender: Male
Quote:
Originally Posted by FL . View Post
Try: @pic.name=("Graphics/Pictures/splash_"+@splash.to_s)
That fixes the problem with the error showing up, thanks! The pictures of the title screen don't show up, though.
__________________

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 08:33 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.