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.


Advertise here

Reply
Click here to go to the first staff post in this thread.  
Thread Tools
  #1    
Old March 19th, 2012, 11:59 AM
Pia Carrot's Avatar
Pia Carrot
Gen II Hacker | PHO Enthusiast
 
Join Date: Aug 2010
Age: 19
Gender: Male
Nature: Adamant

Advertise here
Hello, PC. I wrote this up real quickly. Make an new script above main and put the script in. What it does, is that when Switch 42 is on, the game will go into Turbo speed while on the map. I was able to get it to work with an item, but it's easier to do with a Parallel Process turning the switch on.



Script:
Code:
#########################################
# Turbo Speed Script by Pia Carrot      #
# Released March 19th, 2012             #  
#########################################
# Instructions:                         #
# Though it's rather self explanatory,  # 
# this little snippet:                  #
#          if $game_switches[42]        #
# Can be changed to whatever you please,#
# even something other than a switch.   #
#                                       #
# Credits: Maruno, Pia Carrot           #
# Why Maruno? Shiny Pokémon Reference,  #
# current Pokémon Essentials Owner      # 
#########################################
class Game_System

  alias upd_old_speedup update
  def update
    if $game_switches[42]
      Graphics.frame_rate = 160
    else
      Graphics.frame_rate = 40
    end
    upd_old_speedup
  end

end

class MoveSelectionSprite < SpriteWrapper

  def update
    if $game_switches[42]
      Graphics.frame_rate = 160
    else
      Graphics.frame_rate = 40
    end
    upd_old_speedup
  end

end

class PokeBattle_Battler
  
  def update
    if $game_switches[42]
      Graphics.frame_rate = 160
    else
      Graphics.frame_rate = 40
    end
    upd_old_speedup
  end

end

class PokeBattle_ActiveSide
  
  def update
    if $game_switches[42]
      Graphics.frame_rate = 160
    else
      Graphics.frame_rate = 40
    end
    upd_old_speedup
  end

end
Please note the script does not work in DEBUG Mode. Please compile your game and use the Game.exe to test it.

Credits: Pia Carrot, Maruno (Reference)

Update. Now speeds up battles, Pokédex, and summary screens.
__________________




Last edited by Pia Carrot; March 19th, 2012 at 03:59 PM. Reason: Your double post has been automatically merged.
Reply With Quote
  #2    
Old June 7th, 2012, 05:06 AM
ZarakiKenpachiSan's Avatar
ZarakiKenpachiSan
Beginning Trainer
 
Join Date: Jun 2012
Gender: Male
Hey
Is is possible to make this script run only if the player is pressing down a particular button? I tried it using Input.press but that didn't work...
Reply With Quote
  #3    
Old June 9th, 2012, 04:42 AM
abnegation's Avatar
abnegation
proudly paired with adventure
Community Supporter
 
Join Date: Apr 2009
Age: 21
While this is a thread revival, I'm going to go ahead and leave it open as this is a decent resource. But in future Zara, please do not revive threads in the Game Development section (including its sub-forums) in which are over 2 months old. Thanks!
__________________
Taking time off from being a Super Moderator on this forum.
I may be back in due course, until then I will be inactive.
Now you're aware.

the internet is full of people who refuse to be nice to others
because they feel that this makes them superior
that's lame
Reply With Quote
  #4    
Old June 9th, 2012, 03:00 PM
FL's Avatar
FL
Pokémon Island Creator
 
Join Date: Sep 2010
Gender: Male
Quote:
Originally Posted by ZarakiKenpachiSan View Post
Hey
Is is possible to make this script run only if the player is pressing down a particular button? I tried it using Input.press but that didn't work...
An example (untested) with F9 (change with 'A' to use the running button to turbo button). In PokemonSystem, before line 'if trigger?(Input::F7)' add:
Code:
turbopress=false
if trigger?(Input::F9)
     turbopress=true
end
$game_switches[42]=turbopress
Maybe you need to change the 'trigger?' to 'press?'.
__________________
Reply With Quote
  #5    
Old June 13th, 2012, 12:21 AM
ZarakiKenpachiSan's Avatar
ZarakiKenpachiSan
Beginning Trainer
 
Join Date: Jun 2012
Gender: Male
@Abnegation: Sorry! I didn't realize the thread was dead... my bad.
@FL: I tried it and it kept giving me a no method error. Any other ideas?
Reply With Quote
Reply
Quick Reply

Sponsored Links


Advertise here
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 07:55 AM.


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.