Per 2016, RMID pindah ke RMID Discord (Invite link dihapus untuk mencegah spambot -Theo @ 2019). Posting sudah tidak bisa dilakukan lagi.
Mohon maaf atas ketidaknyamanannya dan mohon kerjasamanya.
|
|
| [XP] Listra Smooth Scroller Module | |
| 2010-12-27, 16:48 | [XP] Listra Smooth Scroller Module |
---|
bungatepijalan Moe Princess
Posts : 1487 Thanked : 30 Engine : Multi-Engine User Skill : Intermediate Type : Developer
Awards:
| Listra Smooth Scroller Module Version 1.0 Type: Map Scroll Listra Smooth Scroller Module (LSSM) membuat scroll pada map menjadi smooth, seperti pada game ojekku: Zhan Chang, yang juga pake scroll yang smooth.
Inilah codingan scriptnya... - Code:
-
#============================================================================== # Listra Smooth Scroller Module by Bunga Tepi Jalan # for RPG Maker XP # Version 1.0 #============================================================================== # Copyrighted by Bunga Tepi Jalan. # * Don't forget to credit me if you want to use this work # * You are free to Share - to copy, distribute and transmit the work # * You are free to Remix - to adapt the work # * You may not use this work for commercial purposes # #============================================================================== # Information: # This script makes map scroll smoother. # # If you find any bugs or you have any suggestions, please report them via # e-mail (listra92@gmail.com), or either my blog or these forums: # - http://bungatepijalan.wordpress.com # - http://rmid.forumotion.net # - http://prodig.forumotion.net # - http://vixep.forumotion.com #==============================================================================
module LSSM #-------------------------------------------------------------------------- # * Listra Smooth Scroller Module Configuration #-------------------------------------------------------------------------- # Config 1 -- Smooth scroll factor, higher value makes scroll slower SMOOTH = 16.0 # Config 2 -- Custom horizontal & vertical map scroll border, # don't exceed CENTER_X and CENTER_Y HBOR = 320 * 4 VBOR = 240 * 4 # Config 3 -- Use HBOR & VBOR? USECUSTOMBOR = false end
#============================================================================== # ** Game_Player #------------------------------------------------------------------------------ # This class handles the player. Its functions include event starting # determinants and map scrolling. Refer to "$game_player" for the one # instance of this class. #==============================================================================
class Game_Player < Game_Character #-------------------------------------------------------------------------- # * Invariables (changed) #-------------------------------------------------------------------------- CENTER_X = 320 * 4 # Center screen x-coordinate * 4 CENTER_Y = 240 * 4 # Center screen y-coordinate * 4 #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update # Remember whether or not moving in local variables last_moving = moving? # If moving, event running, move route forcing, and message window # display are all not occurring unless moving? or $game_system.map_interpreter.running? or @move_route_forcing or $game_temp.message_window_showing # Move player in the direction the directional button is being pressed case Input.dir4 when 2 move_down when 4 move_left when 6 move_right when 8 move_up end end # Remember coordinates in local variables last_real_x = @real_x last_real_y = @real_y super # Player position as the real target coordinate (times 4) # Disable this if you want to use another position at certain event target_x = @real_x target_y = @real_y # Horizontal & vertical scroll border if LSSM::USECUSTOMBOR hbor = LSSM::HBOR vbor = LSSM::VBOR else hbor = CENTER_X vbor = CENTER_Y end # If character is positioned lower than the center of the screen if target_y - $game_map.display_y > 15*128 - vbor # Scroll map down if target_y > $game_map.height*128 - vbor $game_map.scroll_down((($game_map.height - 15)*128 - $game_map.display_y)/LSSM::SMOOTH) else $game_map.scroll_down((target_y - $game_map.display_y - 15*128 + vbor)/LSSM::SMOOTH) end end # If character is positioned more left on-screen than center if target_x - $game_map.display_x < hbor # Scroll map left if target_x < hbor $game_map.scroll_left($game_map.display_x/LSSM::SMOOTH) else $game_map.scroll_left(($game_map.display_x + hbor - target_x)/LSSM::SMOOTH) end end # If character is positioned more right on-screen than center if target_x - $game_map.display_x > 20*128 - hbor # Scroll map right if target_x > $game_map.width*128 - hbor $game_map.scroll_right((($game_map.width - 20)*128 - $game_map.display_x)/LSSM::SMOOTH) else $game_map.scroll_right((target_x - $game_map.display_x - 20*128 + hbor)/LSSM::SMOOTH) end end # If character is positioned higher than the center of the screen if target_y - $game_map.display_y < vbor # Scroll map up if target_y < vbor $game_map.scroll_up($game_map.display_y/LSSM::SMOOTH) else $game_map.scroll_up(($game_map.display_y + vbor - target_y)/LSSM::SMOOTH) end end # If not moving unless moving? # If player was moving last time if last_moving # Event determinant is via touch of same position event result = check_event_trigger_here([1,2]) # If event which started does not exist if result == false # Disregard if debug mode is ON and ctrl key was pressed unless $DEBUG and Input.press?(Input::CTRL) # Encounter countdown if @encounter_count > 0 @encounter_count -= 1 end end end end # If C button was pressed if Input.trigger?(Input::C) # Same position and front event determinant check_event_trigger_here([0]) check_event_trigger_there([0,1,2]) end end end end Cara Pemasangan? Buat slot script baru di atas Main pada Script Editor, lalu copas script LSSM di situ.
NB: Jangan lupa kredit saya yah kalo mau menggunakan ini.. Sorry, no screenshots and demo. Script LSSM dalam RGSS2 nanti menyusul, atau coba kalian translate ke RGSS2 |
| | | 2010-12-27, 17:01 | Re: [XP] Listra Smooth Scroller Module |
---|
LiTTleDRAgo Senior
Posts : 712 Thanked : 27 Engine : RMXP Skill : Skilled Type : Scripter
Awards:
| saya ga ngerti, smoother maksudnya gimana yah? saya coba dulu yah buat bedain efeknya ----edit : oh ngerti gw, jadi pas karakter ada di map yang gede pas jalannya kamera jadi keliatan halus gitu sayang bentrok ama CMS gw (wrong number of argument (7for 6)) |
| | | 2010-12-27, 20:57 | Re: [XP] Listra Smooth Scroller Module |
---|
bungatepijalan Moe Princess
Posts : 1487 Thanked : 30 Engine : Multi-Engine User Skill : Intermediate Type : Developer
Awards:
| | | | 2010-12-27, 22:24 | Re: [XP] Listra Smooth Scroller Module |
---|
LiTTleDRAgo Senior
Posts : 712 Thanked : 27 Engine : RMXP Skill : Skilled Type : Scripter
Awards:
| yaa kalo ABS kan dah jelas ngerubah Game_Player jadi...... kalo mau ngecompatibilitiin mesti obrak abrik ABSnya juga masalah ama CMS gw dah compatibel tapi pas gw coba bareng blizz abs efeknya tetep ga ngaruh gw pasang kalo gw ga pake ABS aja deh |
| | | 2010-12-28, 05:25 | Re: [XP] Listra Smooth Scroller Module |
---|
TheoAllen ♫ RMID Rebel ♫
Posts : 4935 Thanked : 63
Awards:
| | | | 2011-01-16, 08:21 | Re: [XP] Listra Smooth Scroller Module |
---|
LiTTleDRAgo Senior
Posts : 712 Thanked : 27 Engine : RMXP Skill : Skilled Type : Scripter
Awards:
| ah iya gw lupa mau ngepost Blizz ABS versionnya - Code:
-
#============================================================================== # Listra Smooth Scroller Module (Blizz ABS Version) by Bunga Tepi Jalan # for RPG Maker XP # Version 1.0 #============================================================================== # Copyrighted by Bunga Tepi Jalan. # * Don't forget to credit me if you want to use this work # * You are free to Share - to copy, distribute and transmit the work # * You are free to Remix - to adapt the work # * You may not use this work for commercial purposes # #============================================================================== # Information: # This script makes map scroll smoother. # # If you find any bugs or you have any suggestions, please report them via # e-mail (listra92@gmail.com), or either my blog or these forums: # - http://bungatepijalan.wordpress.com # - http://rmid.forumotion.net # - http://prodig.forumotion.net # - http://vixep.forumotion.com #==============================================================================
module LiTTleDRAgo #-------------------------------------------------------------------------- # * Listra Smooth Scroller Module Configuration #-------------------------------------------------------------------------- # Config 1 -- Smooth scroll factor, higher value makes scroll slower SMOOTH = 16.0 # Config 2 -- Custom horizontal & vertical map scroll border, # don't exceed CENTER_X and CENTER_Y HBOR = 320 * 4 VBOR = 240 * 4 # Config 3 -- Use HBOR & VBOR? USECUSTOMBOR = false # Config 4 -- Switch to activate Smooth Scroller SMOOTHSWITCH = 4 end
module BlizzABS #============================================================================ # BlizzABS::Controller #---------------------------------------------------------------------------- # This class is a special controller that controls the party leader. #============================================================================ class Controller include LiTTleDRAgo def update_moving(data) if data != nil moved, x, y = data
USECUSTOMBOR ? hbor = HBOR : hbor = 320 * 4 USECUSTOMBOR ? vbor = VBOR : vbor = 240 * 4 if $game_switches[SMOOTHSWITCH] if y - $game_map.display_y > 15*128 - vbor if y > $game_map.height*128 - vbor $game_map.scroll_down((($game_map.height - 15)*128 - $game_map.display_y)/SMOOTH) else $game_map.scroll_down((y - $game_map.display_y - 15*128 + vbor)/SMOOTH) end end if x - $game_map.display_x < hbor $game_map.scroll_left($game_map.display_x/SMOOTH) if x < hbor $game_map.scroll_left(($game_map.display_x + hbor - x)/SMOOTH) if x >= hbor end if x - $game_map.display_x > 20*128 - hbor if x > $game_map.width*128 - hbor $game_map.scroll_right((($game_map.width - 20)*128 - $game_map.display_x)/SMOOTH) else $game_map.scroll_right((x - $game_map.display_x - 20*128 + hbor)/SMOOTH) end end if y - $game_map.display_y < vbor $game_map.scroll_up($game_map.display_y/SMOOTH) if y < vbor $game_map.scroll_up(($game_map.display_y + vbor - y)/SMOOTH) if y >= vbor end else if player.real_y > y && player.real_y - $game_map.display_y > CY $game_map.scroll_down(player.real_y - y) end if player.real_x < x && player.real_x - $game_map.display_x < CX $game_map.scroll_left(x - player.real_x) end if player.real_x > x && player.real_x - $game_map.display_x > CX $game_map.scroll_right(player.real_x - x) end if player.real_y < y && player.real_y - $game_map.display_y < CY $game_map.scroll_up(y - player.real_y) end end unless player.moving? if moved && !check_event_trigger_here(Cache::TouchTrigger) && !($DEBUG && Input.press?(Input::CTRL)) && @encounter_count > 0 @encounter_count -= 2 ** (5 - $game_system.pixel_rate) @encounter_count = 0 if @encounter_count < 0 end if Input.trigger?(Input::C) check_event_trigger_here(Cache::PressTrigger) check_event_trigger_there(Cache::BasicTrigger) end end end ($BlizzABS.battlers - [player]).each {|actor| actor.update} end end end
kalau mau dipake ditaro di bawah blizz abs |
| | | 2011-01-16, 16:28 | Re: [XP] Listra Smooth Scroller Module |
---|
bungatepijalan Moe Princess
Posts : 1487 Thanked : 30 Engine : Multi-Engine User Skill : Intermediate Type : Developer
Awards:
| @^ Thanks atas scriptmu, it works! Tapi saran dariku: SMOOTHSWITCH kynya ga perlu amat, kecuali kalo mo bikin menu settingan aktivasinya |
| | | 2011-01-16, 17:14 | Re: [XP] Listra Smooth Scroller Module |
---|
LiTTleDRAgo Senior
Posts : 712 Thanked : 27 Engine : RMXP Skill : Skilled Type : Scripter
Awards:
| masalahnya kalo ini skrip aktif, command scroll map di rmxp jadi kaco jadi mending bisa di enable / disable sesuai keperluan aja ni skrip dari kapan gw dah selesein baru keinget buat ngepost disini pas ngobrak abrik test bed |
| | | | Re: [XP] Listra Smooth Scroller Module |
---|
Sponsored content
| | | | | [XP] Listra Smooth Scroller Module | |
|
Similar topics | |
|
Similar topics | |
| |
Halaman 1 dari 1 | |
| Permissions in this forum: | Anda tidak dapat menjawab topik
| |
| |
Latest 10 Topics | [Web Novel] Gloria Infidelis 2016-11-17, 21:27 by LightNightKnight
[Announcement] Forum baru untuk RMID 2016-08-25, 16:39 by TheoAllen
Where I'm Wrong ? 2016-07-24, 16:10 by ReydVires
flakeheartnet's Resources part III 2016-07-08, 14:30 by flakeheartnet
Keira's Art Warehouse 2016-06-28, 19:27 by KeiraBlaze
Theo Core Time System + Bingung 2016-06-27, 16:24 by Lockin
Error Script, Maybe ? 2016-06-27, 16:20 by Lockin
Nusaimoe @ RMID Lounge 2016-06-21, 05:02 by Jihad Bagas
Call Random Battle 2016-06-15, 17:04 by Lockin
Flakeheartnet Resources Part II [come back gift] 2016-06-07, 15:51 by flakeheartnet
|
Statistics
|
Members: [ 4947 ]
Topics: [ 8258 ]
Posts: [ 112606 ]
Newest member: [ https://rmid.forumotion.net/u4968 ]
|
|
|
|
|
|