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.
|
|
| Error Dash Stamina by wltr3565 | |
| 2012-05-06, 18:42 | Error Dash Stamina by wltr3565 |
---|
yade26 Novice
Posts : 132 Thanked : 0 Engine : RMVX Ace Skill : Skilled Type : Scripter
| gan, knapa di ojek saya script Dash Stamina buatan wltr3565 koq error... ada tulisan kyak gini.... Error Script Line at 253 - Quote :
- nil can't coerced into Fixnum
Apa bentrok ya ama Neo Gauge Final ?? ada patchnya gk... |
| | | 2012-05-06, 18:45 | Re: Error Dash Stamina by wltr3565 |
---|
Lukas Senior
Posts : 618 Thanked : 22
| bisa post scriptnya ? edited: - Code:
-
=begin ================================================================================ Dashing Stamina v1.2 by wltr3565 ================================================================================ One of my "assignments" as my team's scripter. He needs a script for limiting dash. So I made this one. ================================================================================ Features: - Configureable dashing limit. - Easy to use, maybe. - Animative gauge HUD. - Adjustable "tired" period. - Available for using image or the normal gauge! ================================================================================ How it will work: The stamina will be consumed as the player dashes, and recovers as the player stops dashing. ================================================================================ How to Use: Configure the module below. The HUD_SWITCH sets the switch for turning the HUD on or off. And to change the stamina limit, use this in the script command event: $game_system.max_stamina = n n represents the new max stamina. ================================================================================ Install: Insert this above main. ================================================================================ Terms of Use: Credit me, wltr3565, or not is up to you. Just don't claim that this is made by you, and crediting me will be nice. ================================================================================ Thanks: Kuro Creator: My boss. ================================================================================ =end #=============================================================================== # COMMENCING COMPATIBILITY FLAG #=============================================================================== $imported = {} if $imported == nil $imported["wltr3565's_Dash_Stamina"] = true #=============================================================================== # END COMPATIBILITY FLAG #=============================================================================== module WLTR module DASH_STAMINA #=============================================================================== # Below will define the starting max stamina. #=============================================================================== MAX = 100 #=============================================================================== # This will adjust the consuming period. The period works for adjusting the # stamina consuming period. The larger the number, the longer the stamina to # decrease. #=============================================================================== CONSUME_PERIOD = 5 #=============================================================================== # This will adjust the stamina consumption for each period. The larger the # number, the faster the stamina will be consumed. #=============================================================================== CONSUME = 10 #=============================================================================== # This will adjust the stamina recovery for each period. The larger the number, # the faster the stamina to be recovered. #=============================================================================== RECOVER = 15 #=============================================================================== # This will make the stamina gauge's color. #=============================================================================== GAUGE_COLOR = Color.new(50, 255, 255) #=============================================================================== # This will set the switch that handles the toggling for showing the HUD on or # off. #=============================================================================== HUD_SWITCH = 20 #=============================================================================== # The speed for the gauge's increasing and decreasing speed. #=============================================================================== GAUGE_ALTER_SPEED = 3 #=============================================================================== # Set's the gauge's x position in the screen. The larger the number, the more # the gauge to move to right. #=============================================================================== GAUGE_X = 544-100 #=============================================================================== # Set's the gauge's y position in the screen. The larger the number, the more # the gauge to move downwards. #=============================================================================== GAUGE_Y = 10 #=============================================================================== # Set's the gauge's width. The larger the number, the longer the gauge. #=============================================================================== GAUGE_WIDTH = 100 #=============================================================================== # Set's the gauge's height. The larger the number, the wider the gauge. #=============================================================================== GAUGE_HEIGHT = 10 #=============================================================================== # Do you want to use images for the gauges? Make sure that you have the images # in Graphics/System folder of your game. #=============================================================================== IMAGE_MODE = false #=============================================================================== # Image for the skin. What's the file name? Only useful when IMAGE_MODE is true. #=============================================================================== GAUGE_SKIN_IMAGE = "dash_skin.png" #=============================================================================== # Image for the gauge. What's the file name? Only useful when IMAGE_MODE true. #=============================================================================== GAUGE_IMAGE = "dash_gauge.png" #=============================================================================== # The gauge's horizontal position from the skin's position. In case to fit the # gauge's position with the skin's layout. Bigger the number, the more it goes # to the right. #=============================================================================== GAUGE_RE_X = 0 #=============================================================================== # The gauge's vertical position from the skin's position. In case to fit the # gauge's position with the skin's layout. Bigger the number, the more it goes # to the bottom. #=============================================================================== GAUGE_RE_Y = 0 end end
#=============================================================================== # Touching below will be dangerous without proper skill of scripting. Therefor, # edit and read at your own risk. #===============================================================================
class Game_System attr_accessor :stamina attr_accessor :max_stamina alias stamina_initialize initialize def initialize stamina_initialize @stamina = WLTR::DASH_STAMINA::MAX @max_stamina = @stamina end end
class Scene_Map < Scene_Base alias start_stamina start def start start_stamina @stamina_gauge = Sprite_Stamina.new end alias update_stamina_hud update def update update_stamina_hud @stamina_gauge.update end alias reupdate_stamina update_transfer_player def update_transfer_player return unless $game_player.transfer? reupdate_stamina @stamina_gauge.dispose @stamina_gauge = Sprite_Stamina.new end end
class Game_Player < Game_Character alias dash_stamina dash? def dash? result = dash_stamina @period = 0 if @period == nil if Input.press?(Input::A) @period += 1 if @period == WLTR::DASH_STAMINA::CONSUME_PERIOD @period = 0 $game_system.stamina -= WLTR::DASH_STAMINA::CONSUME $game_system.stamina = 0 if $game_system.stamina < 0 end else @period = 0 $game_system.stamina += WLTR::DASH_STAMINA::RECOVER $game_system.stamina = $game_system.max_stamina if $game_system.stamina > $game_system.max_stamina end return false if $game_system.stamina == 0 return result end end
class Sprite_Stamina < Sprite #-------------------------------------------------------------------------- # * Object Initialization # viewport : viewport #-------------------------------------------------------------------------- def initialize super(Viewport.new(0, 0, 544, 416)) @gauge_skin = Sprite.new(Viewport.new(0, 0, 544, 416)) unless WLTR::DASH_STAMINA::IMAGE_MODE @gauge_skin.bitmap = Bitmap.new(WLTR::DASH_STAMINA::GAUGE_WIDTH, WLTR::DASH_STAMINA::GAUGE_HEIGHT) @gauge_skin.bitmap.fill_rect(Rect.new(0, 0, WLTR::DASH_STAMINA::GAUGE_WIDTH, WLTR::DASH_STAMINA::GAUGE_HEIGHT), Color.new(0, 0, 0)) else @gauge_skin.bitmap = Cache.system(WLTR::DASH_STAMINA::GAUGE_SKIN_IMAGE) end @gauge_skin.x = WLTR::DASH_STAMINA::GAUGE_X @gauge_skin.y = WLTR::DASH_STAMINA::GAUGE_Y @gauge_skin.z = 200 @gauge = Sprite.new(Viewport.new(0, 0, 544, 416)) unless WLTR::DASH_STAMINA::IMAGE_MODE @gauge.bitmap = Bitmap.new(WLTR::DASH_STAMINA::GAUGE_WIDTH, WLTR::DASH_STAMINA::GAUGE_HEIGHT) @gauge.bitmap.fill_rect(Rect.new(0, 0, WLTR::DASH_STAMINA::GAUGE_WIDTH, WLTR::DASH_STAMINA::GAUGE_HEIGHT), WLTR::DASH_STAMINA::GAUGE_COLOR) else @gauge.bitmap = Cache.system(WLTR::DASH_STAMINA::GAUGE_IMAGE) end @gauge.x = WLTR::DASH_STAMINA::GAUGE_X + WLTR::DASH_STAMINA::GAUGE_RE_X @gauge.y = WLTR::DASH_STAMINA::GAUGE_Y + WLTR::DASH_STAMINA::GAUGE_RE_Y @gauge.z = 250 update end #-------------------------------------------------------------------------- # * Dispose #-------------------------------------------------------------------------- def dispose @gauge_skin.dispose @gauge.dispose super end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super @gauge_skin.visible = $game_switches[WLTR::DASH_STAMINA::HUD_SWITCH] @gauge_skin.visible = false if $game_temp.in_battle @gauge.visible = $game_switches[WLTR::DASH_STAMINA::HUD_SWITCH] @gauge.visible = false if $game_temp.in_battle gauge_width = @gauge.bitmap.width * $game_system.stamina / $game_system.max_stamina gauge_width.round if @gauge.width < gauge_width boost = WLTR::DASH_STAMINA::GAUGE_ALTER_SPEED @gauge.src_rect.width += boost @gauge.src_rect.width = gauge_width.round if @gauge.src_rect.width > gauge_width elsif @gauge.width > gauge_width boost = WLTR::DASH_STAMINA::GAUGE_ALTER_SPEED @gauge.src_rect.width -= boost @gauge.src_rect.width = gauge_width.round if @gauge.src_rect.width < gauge_width end end end #=============================================================================== # # END OF SCRIPT # #=============================================================================== barusan saya coba itu di VX jadi kok. edited di gabung sama [VX] <+ [Neo Gauge] ENGINE -> by Woratana jg jadi.
Terakhir diubah oleh Lukas tanggal 2012-05-06, 19:13, total 2 kali diubah |
| | | 2012-05-06, 18:49 | Re: Error Dash Stamina by wltr3565 |
---|
LowlingLife Administrator
Posts : 2000 Thanked : 25 Engine : Multi-Engine User
Awards:
| @ om yade : Kayaknya ada masalah dengan konfigurasi scriptnya. Udah di atur dengan benar blom? |
| | | 2012-05-06, 18:57 | Re: Error Dash Stamina by wltr3565 |
---|
marjoni01 Senior
Posts : 971 Thanked : 5 Engine : RMVX Ace Skill : Intermediate Type : Developer
| Ini juga bisa masalah kompatibilitas Udh coba di project baru yang tidak ada script lain selain itu? Kalau masih error berarti ya masalah konfigurasi anda |
| | | 2012-05-06, 20:25 | Re: Error Dash Stamina by wltr3565 |
---|
wltr3565 Senior
Posts : 870 Thanked : 28 Engine : RMVX Skill : Skilled Type : Scripter
Awards:
| Biar kutebak, pasti itu digunakan dari savean lama. New game aja. |
| | | 2012-05-06, 20:47 | Re: Error Dash Stamina by wltr3565 |
---|
yade26 Novice
Posts : 132 Thanked : 0 Engine : RMVX Ace Skill : Skilled Type : Scripter
| wah skarang jdi bisa.... tpi pas mw battle n ngegunain skill ada error lagi pada Game_switches Line 20 ada text semacam ini : "no implicit conversion nil to integer" itu apa maksudnya gan...?? |
| | | 2012-05-06, 23:52 | Re: Error Dash Stamina by wltr3565 |
---|
LiTTleDRAgo Senior
Posts : 712 Thanked : 27 Engine : RMXP Skill : Skilled Type : Scripter
Awards:
| itu terjadi kalo misalnya switch yg kk pake itu nil $game_switches[nil] = true pasti itu masalah dengan skrip lain, di skripnya kk wltr gw ga liat ada yg aneh (dan tentunya skrip kk wltr tidak ada hubungannya sama Scene_Battle) uplot aja sample project dengan skrip2 yg kk pake didalamnya |
| | | 2012-05-07, 14:56 | Re: Error Dash Stamina by wltr3565 |
---|
yade26 Novice
Posts : 132 Thanked : 0 Engine : RMVX Ace Skill : Skilled Type : Scripter
| msalahnya inetnya lama gan......... mungkin lain kali aja... terakhir kali ane mke scrip ini, - Spoiler:
module Moon module Message_Before_Skill Skill = [] Skill_Switch = [] # The Skill Message # Skill[ <skill_id> ] = "<The Message>" Skill[125] = "Katon : Goukakyou No Jutsu!" # Condictions for the skill Message # Skill_Switch[ <skill_id> ] = <The Switch ID> Skill_Switch[33] = 10 # Wait time # After this time the message will disapear WaitTime = 60 end end
class Scene_Battle < Scene_Base alias execute_action_skill_moon_message_befor_skill execute_action_skill #-------------------------------------------------------------------------- # * Execute Battle Action: Skill #-------------------------------------------------------------------------- def execute_action_skill skill = @active_battler.action.skill skill_text = Moon::Message_Before_Skill::Skill[skill.id] cond = $game_switches[Moon::Message_Before_Skill::Skill_Switch[skill.id]] cond = true if cond.nil? text = moon if !skill_text.nil? and cond @message_window.add_instant_text(text) wait(Moon::Message_Before_Skill::WaitTime) @message_window.clear execute_action_skill_moon_message_befor_skill end end
coba diteliti.... |
| | | 2012-05-07, 15:05 | Re: Error Dash Stamina by wltr3565 |
---|
LiTTleDRAgo Senior
Posts : 712 Thanked : 27 Engine : RMXP Skill : Skilled Type : Scripter
Awards:
| - Code:
-
cond = $game_switches[Moon::Message_Before_Skill::Skill_Switch[skill.id]] ganti jadi - Code:
-
switch = Moon::Message_Before_Skill::Skill_Switch[skill.id] cond = $game_switches[switch] if switch != nil |
| | | 2012-05-07, 15:26 | Re: Error Dash Stamina by wltr3565 |
---|
yade26 Novice
Posts : 132 Thanked : 0 Engine : RMVX Ace Skill : Skilled Type : Scripter
| waduh,, ada error lagi gan Game_Message line 20 |
| | | 2012-05-07, 15:33 | Re: Error Dash Stamina by wltr3565 |
---|
Lukas Senior
Posts : 618 Thanked : 22
| - yade26 wrote:
- waduh,, ada error lagi gan
Game_Message line 20 game_message line 20 rmvx "attr_accessor :position" ? klo tanya skalian post, error apaan, kan ada namanya.. klo bisa + post scriptnya. biar bisa cepet di bantu. |
| | | 2012-05-07, 15:45 | Re: Error Dash Stamina by wltr3565 |
---|
LiTTleDRAgo Senior
Posts : 712 Thanked : 27 Engine : RMXP Skill : Skilled Type : Scripter
Awards:
| --edit : keduluan lukas lah line 20 cuma attr_accessor tuh, post aja skrip yg errornya |
| | | 2012-05-07, 16:05 | Re: Error Dash Stamina by wltr3565 |
---|
Lukas Senior
Posts : 618 Thanked : 22
| - LiTTleDRAgo wrote:
- --edit : keduluan lukas
lah line 20 cuma attr_accessor tuh, post aja skrip yg errornya wkwkwwk siapa cepat dia copet |
| | | 2012-05-07, 19:22 | Re: Error Dash Stamina by wltr3565 |
---|
yade26 Novice
Posts : 132 Thanked : 0 Engine : RMVX Ace Skill : Skilled Type : Scripter
| Ma'af... trnyata udh ketemu bugnya dan udah ane fix... thx buat bantuan kalian... Mod, udah solved nih... di lock ja... |
| | | | Re: Error Dash Stamina by wltr3565 |
---|
Sponsored content
| | | | | Error Dash Stamina by wltr3565 | |
|
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 ]
|
|
|
|
|
|