Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # =============================================================================
- # TheoAllen - Force Stop Movements
- # Version : 1.0
- # Contact : www.rpgmakerid.com (or) http://theolized.blogspot.com
- # (This script documentation is written in informal indonesian language)
- # =============================================================================
- ($imported ||= {})[:Theo_StopMovement] = true
- # =============================================================================
- # CHANGE LOGS:
- # -----------------------------------------------------------------------------
- # 2013.06.27 - Finished script
- # =============================================================================
- =begin
- Perkenalan :
- Script ini untuk menghentikan semua movement event baik itu evented ato
- autonomous. Dan juga dapat menghentikan animasi tileset atau player.
- Cara penggunaan :
- Pasang dibawah material namun diatas main.
- Sisanya edit konfigurasinya.
- Terms of use :
- Credit gw, TheoAllen. Kalo semisal u bisa ngedit2 script gw trus jadi lebih
- keren, terserah. Ane bebasin. Asal ngga ngeklaim aja. Kalo semisal mau
- dipake buat komersil, jangan lupa, gw dibagi gratisannya.
- =end
- # =============================================================================
- # Konfigurasi :
- # =============================================================================
- module THEO
- module MOVEMENT
- # =========================================================================
- TILEMAP_SWITCH = 22 # Switch ID untuk tilemap
- PLAYER_SWITCH = 24 # Switch ID untuk player
- EVENT_SWITCH = 23 # Switch ID untuk event
- # -------------------------------------------------------------------------
- # Tentukan switch disini. Jika switch dengan id diatas bernilai ON, maka
- # movement ataupun animasinya akan berhenti. Meski itu berarti bakal
- # berhenti di tengah jalan pas gerak.
- # =========================================================================
- end
- end
- # =============================================================================
- # Akhir dari konfigurasi
- # =============================================================================
- class Game_Event < Game_Character
- alias pre_stop_update_anim update_animation
- def update_animation
- return if $game_switches[THEO::MOVEMENT::EVENT_SWITCH]
- pre_stop_update_anim
- end
- alias ori_distance_per_frame distance_per_frame
- def distance_per_frame
- return 0 if $game_switches[THEO::MOVEMENT::EVENT_SWITCH]
- return ori_distance_per_frame
- end
- end
- class Game_Player < Game_Character
- alias pre_stop_move_input move_by_input
- def move_by_input
- return if $game_switches[THEO::MOVEMENT::PLAYER_SWITCH]
- pre_stop_move_input
- end
- end
- class Tilemap
- alias pre_update_stop update
- def update
- pre_update_stop unless $game_switches[THEO::MOVEMENT::TILEMAP_SWITCH]
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment