设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1665|回复: 0
打印 上一主题 下一主题

[已经过期] ARPG 按键脚本的问题

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
467 小时
注册时间
2006-10-16
帖子
45
跳转到指定楼层
1
发表于 2011-1-24 12:00:55 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
这是XAS里面的一个脚本...  本来是按下按键蓄力到一定时间才能发放技能.. 有没办法修改成按下按钮直接发放技能呢....     谢谢啦哈哈..
#--------------------------------------------------------------------------
# XAS - CHARGE
#--------------------------------------------------------------------------
def charge_button_update
  
unless $game_system.map_interpreter.running? or
         $game_temp.message_window_showing or $game_map.starting?  or
         self.action != nil or self.knockbacking?  or
  (@actor.states.include?(XAS::SLEEP_ID) or
   @actor.states.include?(XAS::STOP_ID) or
   @actor.states.include?(XAS::SEALATTACK_ID) or
   @actor.states.include?(XAS::MUTE_ID)or
   @actor.states.include?(XAS::BERSERK_ID)) or
   $game_temp.cast_time > 0   
if Input.press?(XAS_COMMAND::SKILL_CHARGE) and @wp_tool_id != nil and
   $game_switches[XAS_COMMAND::COMMAND_DISABLE_SWITCH] == false   
   if hero_charge_graphic?(@actor) and
      $game_temp.xas_charge_time > 10
      nome = Database_Bullet::SELF_MOTIONS[@wp_tool_id]
      @character_name = @actor.character_name + nome.to_s + "_Charge"
   end   
   if MOG::FIXED_DIRECTION_SKILL.include?(@wp_tool_id)
      @direction_fix = true  
      $game_system.move_speed = -1
   else
      $game_system.move_speed = 0
   end  
     if @wp_tool_time != nil
      $game_temp.xas_charge_time += @wp_tool_time if $game_temp.xas_charge_time < 100
      $game_temp.xas_anime_loop += @wp_tool_time
      $game_temp.xas_anime_loop2 += @wp_tool_time
     else
      $game_temp.xas_charge_time += DEFAULT_CHARGE_TIME if $game_temp.xas_charge_time < 100   
      $game_temp.xas_anime_loop += DEFAULT_CHARGE_TIME  
      $game_temp.xas_anime_loop2 += DEFAULT_CHARGE_TIME  
     end  
     if @wp_tool_time != nil
      loop = 40 * @wp_tool_time
     else
      loop = 40 * DEFAULT_CHARGE_TIME
     end   
     if $game_temp.xas_anime_loop > loop
        if $game_temp.xas_anime_loop2 >= 100
          $game_player.animation_id = XAS_FULL_ANIME
        else
          $game_player.animation_id = XAS_CHARGE_ANIME
        end
          $game_temp.xas_anime_loop = 0
     end   
  else
        $game_temp.xas_charge_time = 0 if $game_temp.xas_charge_time < 100
        $game_temp.xas_anime_loop2 = 0
        $game_temp.xas_anime_loop = 0
        $game_system.move_speed = 0
        @direction_fix = false
  end      
end
end

#--------------------------------------------------------------------------
# Release Charge Update
#--------------------------------------------------------------------------
def release_charge_update
  
  if $game_temp.xas_charge_time >= 100 and not Input.press?(XAS_COMMAND::SKILL_CHARGE)
    unless self.action != nil or $game_system.map_interpreter.running? or
    $game_temp.message_window_showing or $game_map.starting? or
    self.knockbacking?
    action_id = @wp_tool_id if @wp_tool_id != nil
    character_real_name
      unless @actor.states.include?(XAS::MUTE_ID) or
             @actor.states.include?(XAS::SEALATTACK_ID) or
             @actor.states.include?(XAS::BERSERK_ID)
         unless action_id == nil or action_id == 0
           skill_id = action_id
           skill    = skill_id == nil ? nil : $data_skills[skill_id]
           sp_cost  = skill.sp_cost
           ct_cost = Database_Bullet::PLAYER_CT_COST[action_id]
             if (ct_cost and $game_system.move_meter < sp_cost) or
                (@actor.sp < sp_cost and ct_cost == false)         
                  $game_system.se_play(XAS_SKILL::NO_CT_SE)
                  @direction_fix = false
                  $game_system.move_speed = 0
                  @character_name = @actor.character_name         
                  $game_temp.xas_charge_time = 0
                  $game_temp.xas_anime_loop = 0
               return         
             end
         end        
       self.shoot(action_id) if action_id != nil   
     else
       $game_player.battler.damage = XAS::SEALED_TEXT
       $game_player.battler.damage_pop = true   
       $game_system.se_play(XAS::SEALED_SE)
     end
  $game_player.clear_setting
  @direction_fix = false
  $game_system.move_speed = 0
  @character_name = @actor.character_name
  end
end
end
end

点评

可以用代码么  发表于 2011-1-24 13:54
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2025-7-21 09:19

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表