| 赞 | 12  | 
 
| VIP | 107 | 
 
| 好人卡 | 6 | 
 
| 积分 | 4 | 
 
| 经验 | 31122 | 
 
| 最后登录 | 2024-6-29 | 
 
| 在线时间 | 1606 小时 | 
 
 
 
 
 
Lv2.观梦者 傻♂逼 
	- 梦石
 - 0 
 
        - 星屑
 - 374 
 
        - 在线时间
 - 1606 小时
 
        - 注册时间
 - 2007-3-13
 
        - 帖子
 - 6562
 
 
   
 
 | 
	
以下引用三厘米的暧昧于2008-5-17 11:14:16的发言: 
 
那么 
如果我的游戏设计的是双主角系统 
男主角是001号角色 
女主角是002号角色 
使用ls几位大哥的脚本只能改变一张行走图 
... 
能不能先判断主角的角色编号 
再执行跑步图替换??  
使用变量001 
1为男 
2为女 
具体控制哪个变量请修改"       actor = $game_actors[$game_switches[1]]      " 
中的1为变量编号 
 
 
#Game_All 
$old = false 
class Game_Player 
alias update_1 update   
def update 
unless $game_map.interpreter.running? 
     if Input.press?(Input::SHIFT) 
      actor = $game_actors[$game_switches[1]]        
      if actor != nil and $old == false and moving? 
       $olddat = actor.character_name 
       actor.set_graphic(actor.character_name+'1', actor.character_index, actor.face_name, actor.face_index)#  if  
       $old = true 
        
       refresh 
      end 
       
    else 
      actor = $game_actors[1] 
       if $old and actor != nil and $olddat != nil 
       actor.set_graphic($olddat, actor.character_index, actor.face_name, actor.face_index) 
       $old = false 
       $olddat = nil 
       refresh 
       end 
     end 
   end 
   update_1 
 end 
end 
 |   
 
 
 
 |