The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Create & Discover > Game Development > Scripts & Tutorials
Reload this Page Essentials Script Turbo Speed
Sign Up Rules/FAQ Daily Battle Blogs Mark Forums Read


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 March 19th, 2012 (11:59 AM). Edited March 19th, 2012 by Pia Carrot.
Pia Carrot's Avatar
Pia Carrot Pia Carrot is offline
is only game bro
 
Join Date: Aug 2010
Age: 20
Gender: Male
Nature: Adamant
Posts: 599
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.
__________________




is only game
Reply With Quote

Relevant Advertising!

  #2    
Old June 7th, 2012 (5:06 AM).
ZarakiKenpachiSan's Avatar
ZarakiKenpachiSan ZarakiKenpachiSan is offline
 
Join Date: Jun 2012
Gender: Male
Posts: 3
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 (4:42 AM).
Abnegation's Avatar
Abnegation Abnegation is offline
breaker of chains
Platinum Tier
 
Join Date: Apr 2009
Location: Ireland
Posts: 10,788
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!
__________________
Reply With Quote
  #4    
Old June 9th, 2012 (3:00 PM).
FL's Avatar
FL FL is offline
Pokémon Island Creator
 
Join Date: Sep 2010
Gender: Male
Posts: 1,604
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 ZarakiKenpachiSan is offline
 
Join Date: Jun 2012
Gender: Male
Posts: 3
@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
  #6    
Old February 1st, 2016 (2:20 PM).
Zeak6464's Avatar
Zeak6464 Zeak6464 is online now
The Cold Guy
 
Join Date: Mar 2013
Location: USA
Gender: Male
Nature: Calm
Posts: 505
Send a message via Skype™ to Zeak6464
Still works on V16.1
__________________
Reply With Quote
  #7    
Old February 25th, 2016 (1:14 PM).
jchumillas jchumillas is offline
 
Join Date: Sep 2015
Gender: Male
Posts: 13
When I access to Pokémon info (in the game), the game crhases in line 38: undefined local variable upd_old_speedup
Reply With Quote
  #8    
Old February 25th, 2016 (2:00 PM).
Zeak6464's Avatar
Zeak6464 Zeak6464 is online now
The Cold Guy
 
Join Date: Mar 2013
Location: USA
Gender: Male
Nature: Calm
Posts: 505
Send a message via Skype™ to Zeak6464
Quote:
Originally Posted by jchumillas View Post
When I access to Pokémon info (in the game), the game crhases in line 38: undefined local variable upd_old_speedup
Here is mine and it works great

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
  end

end

class MoveSelectionSprite < SpriteWrapper

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

end

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

end

class PokeBattle_ActiveSide
  
  def update
    if $game_switches[42]
      Graphics.frame_rate = 160
    else
      Graphics.frame_rate = 40
    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

Forum Jump


All times are GMT -8. The time now is 6:57 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2016 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 - 2016 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.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2016.