Go Back   The PokéCommunity Forums > Creative Discussions > Game Development > Scripts & Tutorials
Reload this Page [Essentials script] Turbo Speed

Notices
For all updates, view the main page.

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
Gen II Hacker | PHO Enthusiast
 
Join Date: Aug 2010
Age: 19
Gender: Male
Nature: Adamant
Posts: 559
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.
__________________




Coming soon to a forum near you...
Reply With Quote
  #2    
Old June 7th, 2012 (05: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 (04:42 AM).
seeker's Avatar
seeker seeker is offline
adventure seeker
Platinum Tier
 
Join Date: Apr 2009
Location: Ireland
Age: 21
Posts: 10,639
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!
__________________
<div style="background-image: url('http://i.imgur.com/bHlfm47.gif'); background-repeat: no-repeat; height: 245px; width: 600px; font-family: 'Dosis', 'Josefin Slab', 'Open Sans', sans-serif; font-weight: 200; font-size: 13px; letter-spacing: 1px; color: #282828; padding-top: 66px; padding-left:43px; text-align: left; line-height: 15px;">
<div style="font-size: 22px;">seeker</div>
<i class="fa fa-heart-o"></i> paired to <a href="http://www.pokecommunity.com/member.php?u=67003"><span class="usergroup-mod">adventure</span></a>
<i class="fa fa-code"></i> <div class="usergroup-admin">staff administrator</div>
on a leave of absence</div>
Reply With Quote
  #4    
Old June 9th, 2012 (03:00 PM).
FL's Avatar
FL FL is offline
Pokémon Island Creator
 
Join Date: Sep 2010
Gender: Male
Posts: 1,435
Quote originally posted by ZarakiKenpachiSan:
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
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 -8. The time now is 10:57 PM.