shadow7396 0 Report post Posted October 23, 2014 Hey i need help with the following script: #:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:# [Xp/Vx-VxA] Automatic Door# Version: 2.00# Author : LiTTleDRAgo#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:#==============================================================================# â– Game_Event#------------------------------------------------------------------------------#  イベントを扱ã†ã‚¯ãƒ©ã‚¹ã§ã™ã€‚æ¡ä»¶åˆ¤å®šã«ã‚ˆã‚‹ã‚¤ãƒ™ãƒ³ãƒˆãƒšãƒ¼ã‚¸åˆ‡ã‚Šæ›¿ãˆã‚„ã€ä¸¦åˆ—処ç†# イベント実行ãªã©ã®æ©Ÿèƒ½ã‚’æŒã£ã¦ãŠã‚Šã€Game_Map クラスã®å†…部ã§ä½¿ç”¨ã•ã‚Œã¾ã™ã€‚#==============================================================================class Game_Event < Game_CharacterVX = defined?(Window_ActorCommand)VXA = defined?(Window_BattleActor)DOOR_SOUND = ["Audio.se_play('Audio/SE/Open1', 90, 100)", # Opened Door"Audio.se_play('Audio/SE/Close1', 90, 100)"] # Closed Door#--------------------------------------------------------------------------# ◠フレーム更新#--------------------------------------------------------------------------alias :drg145_upd :update unless method_defined?(:drg145_upd)def updatedrg145_updupdate_autodoorend#--------------------------------------------------------------------------# ◠ドアã®å…¨ã¦#--------------------------------------------------------------------------def update_autodoorinterpreter = VX ? $game_map.interpreter.running? :$game_system.map_interpreter.running?if @event.name =~ /Door/i && @page.through && !interpreterdistance,type = ($game_player.real_x-@real_x).abs+($game_player.real_y-@real_y).abs, 0number = VXA ? [0.5,1.0,1.5] : VX ? [216,232,248] : [128,132,148]distance = [distance-32,0].max if !VXAcase distancewhen 0...number[0]return if @direction == 8door_se(type * 2) if @direction == 2turn_up@wait_count = 6when number[0]...number[1]return if @direction == 6if @direction > 6 && @wait_count > 0@wait_count -= 1elsif @direction == 8turn_right@wait_count = 6elsedoor_se(type * 2) if @direction == 2turn_right@wait_count = 6endwhen number[1]...number[2] #return if @direction == 4if @direction > 4 && @wait_count > 0@wait_count -= 1elsif @direction == 8turn_right@wait_count = 6elsif @direction == 6turn_left@wait_count = 6elsedoor_se(type * 2) if @direction == 2turn_left@wait_count = 6endelsereturn if @direction == 2if @direction > 2 and @wait_count > 0@wait_count -= 1elsif @direction == 8turn_right@wait_count = 6elsif @direction == 6turn_left@wait_count = 6elsif @direction == 4door_se(type * 2 + 1)turn_downendendendend#--------------------------------------------------------------------------# ◠セト ヂレクシオン#--------------------------------------------------------------------------if VXAdef turn_up() set_direction(8) enddef turn_right()set_direction(6) enddef turn_left() set_direction(4) enddef turn_down() set_direction(2) endend#--------------------------------------------------------------------------# ◠ドア㮠SE è¨å®š#--------------------------------------------------------------------------def door_se(type)case typewhen 2 then eval(DOOR_SOUND[0]) rescue nilwhen 3 then eval(DOOR_SOUND[1]) rescue nilendendend As you can see, this is an automatic door script that activates when you approach it. Well I want to change that. I want it to activate by pressing a button when you're right in front of it facing upwards only. can anyone help? Share this post Link to post Share on other sites
Bigace360 38 Report post Posted October 24, 2014 If you want a locked door, just don't check the "Though" option in the event page. Share this post Link to post Share on other sites
shadow7396 0 Report post Posted October 24, 2014 ok so what do i do when i want to open it Share this post Link to post Share on other sites
Bigace360 38 Report post Posted October 26, 2014 Just click enter. Share this post Link to post Share on other sites
shadow7396 0 Report post Posted October 27, 2014 (edited) ok another question. But first let me post the event: @>Set Move Route: Player: :$>Through ON: :$>Move Up@>Wait for Move's Completion@>Change Transparent Flag: Transparency@>Set Move Route: Player: :$>Wait: 5 frame(s)@>Wait for Move's Completion@>Set Move Route: [Door]: :$>Graphic: "170-Door01', 0, 6, 0: :$>Wait: 2 frame(s): :$>Graphic: "170-Door01', 0, 4, 0: :$>Wait: 2 frame(s): :$>Graphic: "170-Door01', 0, 2, 0: :$>Wait: 5 frame(s)@>Wait for Move's Completion@>Change Screen Color Tone: (-255,-255,-255,0), @10@>Set Move Route: Player: :$>Wait: 15 frame(s)@>Wait for Move's Completion@>Set Move Route: Player: :$>Through OFF@>Play BGM:'Potion Shop', 100, 100@>Transfer Player:[], (010,016), No Fade@>Change Transparency: Normal@>Change Screen Color Tone: (0,0,0,0), @0 Is there a way i can run these event commands along with the script? Edited October 27, 2014 by shadow7396 Share this post Link to post Share on other sites
Bigace360 38 Report post Posted October 28, 2014 I don't see why not, but what is the significance of event command? Share this post Link to post Share on other sites