House Slashers

Latest Shouts In The Shoutbox -- View The Shoutbox · Rules




Profile
Personal Photo

No Photo

Options
Custom Title
gameface101 doesn't have a custom title currently.
Personal Info
Location: stuck in cyberspace
Born: No Information
Interests
RMXP + XAS = ^,^
Other Information
Statistics
Joined: 15-January 10
Status: (Offline)
Last Seen: Mar 1 2010, 06:24 AM
Local Time: Sep 8 2010, 07:04 AM
5 posts (0 per day)
( 0.45% of total forum posts )
Contact Information
AIM No Information
Yahoo No Information
ICQ No Information
MSN No Information
SKYPE No Information
Unread Msg Message: Click here
Unread Msg Email: Private
Signature
View Signature

gameface101

Peasant

Topics
Posts
Comments
Friends
My Content
Feb 3 2010, 06:27 PM

DOUBLE TAP to DASH and BLURRR

Version: 2.0



Introduction
This script lives up to it's name, TAP in the same DIRECTION twice to DASH
and a BLUR effect will follow.

*This script also allows you to use the Blur effect on other events.


Script

CODE
################################################################################
#
#                        -[DOUBLE TAP DASH & BLURRR]-
#                               by Gameface101 v.2
#                                  1-28-10
#
# double tap to dash concept from Gamba's ABS
# and trails script by Zues81
#
# free to use
# credits to Gamba,Zues81,Gameface101
#
# Instructions:
# Copy and Paste above Main script in script Database (F11)
# then setup options in the module.
#
# to blur event:
# $game_map.events[X].blur = true
#
# to stop event blur:
# $game_map.events[X].blur = false
#
# X = Event ID number
#
################################################################################
module G101_DTDB

 NORMAL_SPEED = 4 #-----------------------------------------=[set normal speed]
 DASH_SPEED = 5.5 #-------------------------------------------=[set dash speed]
 TIME = 4 #------------------------------------------=[time between double tap]
 SWITCHIMP = 0 #-----------------------------------=[switch for sliding on/off]
 TILEIMP = 7 #------------------------------------------=[tile ID stop sliding]
 CHARACTER_DASH_GRAPHIC = "_dash" #----------------------=["NAME_dash" graphic]
 STOP_DASH = 0 #-----------=[stop sliding - 0 release key - 1 when move direct]
 DISABLE_TIRED_FROM_DASH = true #---------------------=[permanent dash or tire]
 DASH_TIME = 100 #-------------------------------------=[how much time to dash]
 RECHARGE_TIME = 1 #-------------------------------------------=[recharge time]
 START_RECHARGE_TIME = 1 #-------------------=[the instant recharge will begin]
 BLUR_LENGTH = 16
 BLUR_TYPE = 0# 0=Normal 1=Light 2=Dark
 
end

#------------------------------------------------------------------------=[DASH]

class Game_Character
 attr_accessor :move_speed
 attr_accessor :time_dash
 attr_accessor :character_name
 alias double_tap_dash_initialize initialize
 def initialize
   @time_dash = 0
   double_tap_dash_initialize
 end
end

module RPG_FileTest
 def RPG_FileTest.character_exist?(filename)
   return RPG::Cache.character(filename, 0) rescue return false
 end
end

class Game_Map  
attr_accessor :time_dash
attr_accessor :dashing
alias dash_setup setup
def setup(map_id)
 @dash = []
 for i in 2..8
   @dash[i] = 0
 end
 @time_c = 0
 @dashing = false
 @direction = 0
 @time_rec = 0
 $game_player.time_dash = G101_DTDB::DASH_TIME if @time_dash == nil
 dash_setup(map_id)
end

alias dash_update update
def update
dash_update
 if $game_map.terrain_tag($game_player.x , $game_player.y) == G101_DTDB::TILEIMP
   $game_player.character_name = $game_party.actors[0].character_name if $game_player.character_name == $game_party.actors[0].character_name + G101_DTDB::CHARACTER_DASH_GRAPHIC
   if @time_rec == G101_DTDB::START_RECHARGE_TIME
     $game_player.time_dash += (G101_DTDB::DASH_TIME.to_f/(100/G101_DTDB::RECHARGE_TIME.to_f)).to_i if $game_player.time_dash < G101_DTDB::DASH_TIME
     @time_rec = 0
   else
     @time_rec += 1
   end
 end
 if $game_switches[G101_DTDB::SWITCHIMP] == false and $game_map.terrain_tag($game_player.x , $game_player.y) != G101_DTDB::TILEIMP
   
   if @dashing == true
     $game_player.blur = true#
     newname = $game_party.actors[0].character_name + G101_DTDB::CHARACTER_DASH_GRAPHIC if $game_party.actors[0].hp > 0
     $game_player.character_name = newname if $game_player.character_name != newname and
     RPG_FileTest.character_exist?(newname)
     if G101_DTDB::DISABLE_TIRED_FROM_DASH == false
       $game_player.time_dash -= 1
     end
     $game_player.move_speed = G101_DTDB::DASH_SPEED
     if G101_DTDB::STOP_DASH == 0
       unless Input.press?(Input::DOWN) or Input.press?(Input::LEFT) or
          Input.press?(Input::RIGHT) or Input.press?(Input::UP)
          @dashing = false
          $game_player.blur = false#
       end
     elsif G101_DTDB::STOP_DASH == 1
       unless Input.press?(@keyboard) and @direction == $game_player.direction
         @dashing = false
       end
     end
     if $game_player.time_dash <= 0 and G101_DTDB::DISABLE_TIRED_FROM_DASH == false
       @dashing = false
       $game_player.blur = false#
     end
   else
     $game_player.character_name = $game_party.actors[0].character_name if $game_player.character_name == $game_party.actors[0].character_name + G101_DTDB::CHARACTER_DASH_GRAPHIC
     
     if @time_rec == G101_DTDB::START_RECHARGE_TIME
       $game_player.time_dash += (G101_DTDB::DASH_TIME.to_f/(100/G101_DTDB::RECHARGE_TIME.to_f)).to_i if $game_player.time_dash < G101_DTDB::DASH_TIME
       @time_rec = 0
     else
       @time_rec += 1
     end
     $game_player.move_speed = G101_DTDB::NORMAL_SPEED if $game_player.move_speed == G101_DTDB::DASH_SPEED
     dir = $game_player.direction
 
     case dir
       when 2
         @keyboard = Input::DOWN
       when 4
         @keyboard = Input::LEFT
       when 6
         @keyboard = Input::RIGHT
       when 8
         @keyboard = Input::UP
     end  
           
     if @dash[dir] == 1
 
       if Input.press?(@keyboard)
         for i in 2..8
           if i != dir
             @dash[i] = 0
           end
         end
       else
         @dash[dir] = 2
         for i in 2..8
           if i != dir
             @dash[i] = 0
           end
         end
       end

     elsif @dash[dir] == 2
       if @time_c < (G101_DTDB::TIME)
         @time_c += 1
         if Input.press?(@keyboard)
           @time_c = 0
           @dash[dir] = 0
           @dashing = true
           @direction = $game_player.direction
         end
       end
       if @time_c > (G101_DTDB::TIME)
         @time_c = 0
         @dash[dir] = 0
       end
     else
       @time_c = 0
       if Input.press?(@keyboard)
         @dash[dir] = 1
         for i in 2..8
           if i != dir
               @dash[i] = 0
           end
         end
       end
     end
   end
 end
end
end
#------------------------------------------------------------------------=[BLUR]
$blurr_images = G101_DTDB::BLUR_LENGTH
$transparence = G101_DTDB::BLUR_TYPE

class Game_Character

 attr_accessor :blur

 alias spriteset_map_initialize initialize
 def initialize
   spriteset_map_initialize
   @blur = false
 end
end

class Spriteset_Map

 alias spriteset_map_update update
 def update
   if $blurr_images != @last_blurr_images
     @last_blurr_images = $blurr_images
     if @blur_sprites != nil
       for blur_sprite in @blur_sprites.values
         blur_sprite.dispose
       end
       @blur_sprites = nil
     end
   end
   if @blur_sprites == nil
     @blur_sprites = {}
     for i in 0...$blurr_images
       @blur_sprites[i] = Sprite_Blur.new(@viewport1, $game_player)
       @blur_sprites[i].opacity = 256 / $blurr_images * i
     end
   end
   for id in $game_map.events.keys.sort
     event = $game_map.events[id]
     if event.blur == true and @blur_sprites[id * $blurr_images] == nil
       for i in 0...$blurr_images
         @blur_sprites[id * $blurr_images + i] = Sprite_Blur.new(@viewport1, event)
         @blur_sprites[id * $blurr_images + i].opacity = 256 / $blurr_images * i
       end
     end
   end
   for blur_sprite in @blur_sprites.values
     blur_sprite.update
   end
   spriteset_map_update
 end
 
 alias spriteset_map_dispose dispose
 def dispose
   spriteset_map_dispose
   for blur_sprite in @blur_sprites.values
     blur_sprite.dispose
   end
 end
end

class Sprite_Blur < Sprite

 attr_accessor :real_x
 attr_accessor :real_y
 attr_accessor :character

 def initialize(viewport, character)
   super(viewport)
   self.opacity = 0
   @character = character
   update
 end
 
 def update
   if self.opacity == 0
     super
     if @character_name != @character.character_name or @character_hue != @character.character_hue
       @character_name = @character.character_name
       @character_hue = @character.character_hue
       self.bitmap = RPG::Cache.character(@character_name,@character_hue)
       self.blend_type = $transparence
       @cw = bitmap.width / 4
       @ch = bitmap.height / 4
       self.ox = @cw / 2
       self.oy = @ch
     end
     self.visible = (not @character.transparent and @character.blur)
     sx = @character.pattern * @cw
     sy = (@character.direction - 2) / 2 * @ch
     self.src_rect.set(sx, sy, @cw, @ch)
     self.opacity = 255
     self.z = @character.screen_z(@ch) - 1
     @real_x = @character.real_x
     @real_y = @character.real_y
     update
   else
     self.opacity -= 256 / ($blurr_images - 1)
     self.x = (@real_x - $game_map.display_x + 3)/4 + 16
     self.y = (@real_y - $game_map.display_y + 3)/4 + 32
   end
 end
end


Instructions
The instructions are included in the script.
No Graphics are required.

Compatibility
An RGSS / RPGMaker XP system.
There are no known issues so
please inform me of any bugs or better coding.

Terms and Conditions
Free to use must give credit. Enjoy~ ^,^
                                                                                                                                                                                                                                                                                                                                                                                              
Jan 16 2010, 09:03 AM
In an orphanage
there was an orange kid
who didn't run and play
like the other kids did.
He would build communicators
out of Lego blocks,
parts from the T.V.
and two alarm clocks.

When it was time to adopt
people would always stare
at his orange skin
and his orange hair
but he didn't care
he was far from home
no one else was orange
he was so alone...

but then one day
he lifted up his chin
opened up his eyes
and started to grin
with excitement
when this couple walked in
who were looking for a child
orange just like them...                                                                                                                                                                                                                                                                                                                                                                                               
Jan 15 2010, 05:16 PM
Here's a set of sprites I collected together which makes a
perfect set... credits to Falcao, Hackel, Kipe

E_skuller

E_skuller_ACT

E_skuller_HIT

E_skuller_AWAY

E_skuller_ANIMATED_DEFEAT

E_skull

E_skull_ACT

E_skull_HIT




                                                                                                                                                                                                                                                                                                                                                                                              
Jan 15 2010, 08:49 AM
There once was a man who wanted to see more life.
He didn't have no kids, he didn't have no wife.
He didn't have no gun, didn't have no knife.
He didn't have one clue on what to do with with his life.

He didn't have a job, he didn't go to school,
He just traveled the world like an educated fool.
but near the end of his life, he finally reached his goal!
when he finally decided to search his soul...                                                                                                                                                                                                                                                                                                                                                                                               
Last Visitors


Feb 12 2010, 08:17 PM




Feb 3 2010, 06:30 PM




Jan 15 2010, 04:08 PM



Comments
No comments posted.
Add Comment


> Affiliates [ View All | Link-us ]
Punk's Hideout Aramanth Games RMVXPUniverse Loveless Entertainment