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.

Share | 
 

 Error Dash Stamina by wltr3565

Topik sebelumnya Topik selanjutnya Go down 
Error Dash Stamina by wltr3565 Empty2012-05-06, 18:42
PostError Dash Stamina by wltr3565
#1
yade26 
Novice
Novice
yade26

Level 5
Posts : 132
Thanked : 0
Engine : RMVX Ace
Skill : Skilled
Type : Scripter

Error Dash Stamina by wltr3565 Vide
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...
Error Dash Stamina by wltr3565 Empty2012-05-06, 18:45
PostRe: Error Dash Stamina by wltr3565
#2
Lukas 
Senior
Senior
avatar

Level 5
Posts : 618
Thanked : 22

Error Dash Stamina by wltr3565 Vide
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
Error Dash Stamina by wltr3565 Empty2012-05-06, 18:49
PostRe: Error Dash Stamina by wltr3565
#3
LowlingLife 
Administrator
Administrator
LowlingLife

Kosong
Posts : 2000
Thanked : 25
Engine : Multi-Engine User
Awards:

Error Dash Stamina by wltr3565 Vide
@ om yade : Kayaknya ada masalah dengan konfigurasi scriptnya. Udah di atur dengan benar blom?
Error Dash Stamina by wltr3565 Empty2012-05-06, 18:57
PostRe: Error Dash Stamina by wltr3565
#4
marjoni01 
Senior
Senior
marjoni01

Level 5
Posts : 971
Thanked : 5
Engine : RMVX Ace
Skill : Intermediate
Type : Developer

Error Dash Stamina by wltr3565 Vide
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 :3
Error Dash Stamina by wltr3565 Empty2012-05-06, 20:25
PostRe: Error Dash Stamina by wltr3565
#5
wltr3565 
Senior
Senior
wltr3565

Level 5
Posts : 870
Thanked : 28
Engine : RMVX
Skill : Skilled
Type : Scripter
Awards:

Error Dash Stamina by wltr3565 Vide
Biar kutebak, pasti itu digunakan dari savean lama. New game aja.
Error Dash Stamina by wltr3565 Empty2012-05-06, 20:47
PostRe: Error Dash Stamina by wltr3565
#6
yade26 
Novice
Novice
yade26

Level 5
Posts : 132
Thanked : 0
Engine : RMVX Ace
Skill : Skilled
Type : Scripter

Error Dash Stamina by wltr3565 Vide
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...??
Error Dash Stamina by wltr3565 Empty2012-05-06, 23:52
PostRe: Error Dash Stamina by wltr3565
#7
LiTTleDRAgo 
Senior
Senior
LiTTleDRAgo

Level 5
Posts : 712
Thanked : 27
Engine : RMXP
Skill : Skilled
Type : Scripter
Awards:
Error Dash Stamina by wltr3565 Vide
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
Error Dash Stamina by wltr3565 Empty2012-05-07, 14:56
PostRe: Error Dash Stamina by wltr3565
#8
yade26 
Novice
Novice
yade26

Level 5
Posts : 132
Thanked : 0
Engine : RMVX Ace
Skill : Skilled
Type : Scripter

Error Dash Stamina by wltr3565 Vide
msalahnya inetnya lama gan.........
mungkin lain kali aja...

terakhir kali ane mke scrip ini,
Spoiler:

coba diteliti....
Error Dash Stamina by wltr3565 Empty2012-05-07, 15:05
PostRe: Error Dash Stamina by wltr3565
#9
LiTTleDRAgo 
Senior
Senior
LiTTleDRAgo

Level 5
Posts : 712
Thanked : 27
Engine : RMXP
Skill : Skilled
Type : Scripter
Awards:
Error Dash Stamina by wltr3565 Vide

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
Error Dash Stamina by wltr3565 Empty2012-05-07, 15:26
PostRe: Error Dash Stamina by wltr3565
yade26 
Novice
Novice
yade26

Level 5
Posts : 132
Thanked : 0
Engine : RMVX Ace
Skill : Skilled
Type : Scripter

Error Dash Stamina by wltr3565 Vide
waduh,, ada error lagi gan
Game_Message line 20
Error Dash Stamina by wltr3565 Empty2012-05-07, 15:33
PostRe: Error Dash Stamina by wltr3565
Lukas 
Senior
Senior
avatar

Level 5
Posts : 618
Thanked : 22

Error Dash Stamina by wltr3565 Vide
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.
Error Dash Stamina by wltr3565 Empty2012-05-07, 15:45
PostRe: Error Dash Stamina by wltr3565
LiTTleDRAgo 
Senior
Senior
LiTTleDRAgo

Level 5
Posts : 712
Thanked : 27
Engine : RMXP
Skill : Skilled
Type : Scripter
Awards:
Error Dash Stamina by wltr3565 Vide
--edit : keduluan lukas

Error Dash Stamina by wltr3565 873untitled

lah line 20 cuma attr_accessor tuh,
post aja skrip yg errornya
Error Dash Stamina by wltr3565 Empty2012-05-07, 16:05
PostRe: Error Dash Stamina by wltr3565
Lukas 
Senior
Senior
avatar

Level 5
Posts : 618
Thanked : 22

Error Dash Stamina by wltr3565 Vide
LiTTleDRAgo wrote:
--edit : keduluan lukas

Error Dash Stamina by wltr3565 873untitled

lah line 20 cuma attr_accessor tuh,
post aja skrip yg errornya
:P wkwkwwk
siapa cepat dia copet :hammer:
Error Dash Stamina by wltr3565 Empty2012-05-07, 19:22
PostRe: Error Dash Stamina by wltr3565
yade26 
Novice
Novice
yade26

Level 5
Posts : 132
Thanked : 0
Engine : RMVX Ace
Skill : Skilled
Type : Scripter

Error Dash Stamina by wltr3565 Vide
Ma'af... trnyata udh ketemu bugnya dan udah ane fix... :clap:
thx buat bantuan kalian... :)

Mod, udah solved nih... di lock ja...
Error Dash Stamina by wltr3565 Empty
PostRe: Error Dash Stamina by wltr3565
Sponsored content 




Error Dash Stamina by wltr3565 Vide
 

Error Dash Stamina by wltr3565

Topik sebelumnya Topik selanjutnya Kembali Ke Atas 

Similar topics

+
Halaman 1 dari 1

Permissions in this forum:Anda tidak dapat menjawab topik
RPGMakerID :: Scripts & Event Systems :: RMVX Scripts :: RGSS2 Support-