RPGMakerID
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Komunitas RPG Maker Indonesia
 
IndeksIndeks  Latest imagesLatest images  PencarianPencarian  PendaftaranPendaftaran  Login  
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

Go down 
+2
Lukas
yade26
6 posters
PengirimMessage
yade26
Novice
Novice
yade26


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

Error Dash Stamina by wltr3565 Empty
PostSubyek: Error Dash Stamina by wltr3565   Error Dash Stamina by wltr3565 Empty2012-05-06, 18:42

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...
Kembali Ke Atas Go down
http://medlayerz.blogspot.com
Lukas
Senior
Senior
avatar


Level 5
Posts : 618
Thanked : 22

Error Dash Stamina by wltr3565 Empty
PostSubyek: Re: Error Dash Stamina by wltr3565   Error Dash Stamina by wltr3565 Empty2012-05-06, 18:45

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
Kembali Ke Atas Go down
LowlingLife
Administrator
Administrator
LowlingLife


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

Trophies
Awards:

Error Dash Stamina by wltr3565 Empty
PostSubyek: Re: Error Dash Stamina by wltr3565   Error Dash Stamina by wltr3565 Empty2012-05-06, 18:49

@ om yade : Kayaknya ada masalah dengan konfigurasi scriptnya. Udah di atur dengan benar blom?
Kembali Ke Atas Go down
marjoni01
Senior
Senior
marjoni01


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

Error Dash Stamina by wltr3565 Empty
PostSubyek: Re: Error Dash Stamina by wltr3565   Error Dash Stamina by wltr3565 Empty2012-05-06, 18:57

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
Kembali Ke Atas Go down
wltr3565
Senior
Senior
wltr3565


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

Trophies
Awards:

Error Dash Stamina by wltr3565 Empty
PostSubyek: Re: Error Dash Stamina by wltr3565   Error Dash Stamina by wltr3565 Empty2012-05-06, 20:25

Biar kutebak, pasti itu digunakan dari savean lama. New game aja.
Kembali Ke Atas Go down
yade26
Novice
Novice
yade26


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

Error Dash Stamina by wltr3565 Empty
PostSubyek: Re: Error Dash Stamina by wltr3565   Error Dash Stamina by wltr3565 Empty2012-05-06, 20:47

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...??
Kembali Ke Atas Go down
http://medlayerz.blogspot.com
LiTTleDRAgo
Senior
Senior
LiTTleDRAgo


Level 5
Posts : 712
Thanked : 27
Engine : RMXP
Skill : Skilled
Type : Scripter

Trophies
Awards:
Error Dash Stamina by wltr3565 Empty
PostSubyek: Re: Error Dash Stamina by wltr3565   Error Dash Stamina by wltr3565 Empty2012-05-06, 23:52

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
Kembali Ke Atas Go down
yade26
Novice
Novice
yade26


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

Error Dash Stamina by wltr3565 Empty
PostSubyek: Re: Error Dash Stamina by wltr3565   Error Dash Stamina by wltr3565 Empty2012-05-07, 14:56

msalahnya inetnya lama gan.........
mungkin lain kali aja...

terakhir kali ane mke scrip ini,
Spoiler:

coba diteliti....
Kembali Ke Atas Go down
http://medlayerz.blogspot.com
LiTTleDRAgo
Senior
Senior
LiTTleDRAgo


Level 5
Posts : 712
Thanked : 27
Engine : RMXP
Skill : Skilled
Type : Scripter

Trophies
Awards:
Error Dash Stamina by wltr3565 Empty
PostSubyek: Re: Error Dash Stamina by wltr3565   Error Dash Stamina by wltr3565 Empty2012-05-07, 15:05


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
Kembali Ke Atas Go down
yade26
Novice
Novice
yade26


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

Error Dash Stamina by wltr3565 Empty
PostSubyek: Re: Error Dash Stamina by wltr3565   Error Dash Stamina by wltr3565 Empty2012-05-07, 15:26

waduh,, ada error lagi gan
Game_Message line 20
Kembali Ke Atas Go down
http://medlayerz.blogspot.com
Lukas
Senior
Senior
avatar


Level 5
Posts : 618
Thanked : 22

Error Dash Stamina by wltr3565 Empty
PostSubyek: Re: Error Dash Stamina by wltr3565   Error Dash Stamina by wltr3565 Empty2012-05-07, 15:33

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.
Kembali Ke Atas Go down
LiTTleDRAgo
Senior
Senior
LiTTleDRAgo


Level 5
Posts : 712
Thanked : 27
Engine : RMXP
Skill : Skilled
Type : Scripter

Trophies
Awards:
Error Dash Stamina by wltr3565 Empty
PostSubyek: Re: Error Dash Stamina by wltr3565   Error Dash Stamina by wltr3565 Empty2012-05-07, 15:45

--edit : keduluan lukas

Error Dash Stamina by wltr3565 873untitled

lah line 20 cuma attr_accessor tuh,
post aja skrip yg errornya
Kembali Ke Atas Go down
Lukas
Senior
Senior
avatar


Level 5
Posts : 618
Thanked : 22

Error Dash Stamina by wltr3565 Empty
PostSubyek: Re: Error Dash Stamina by wltr3565   Error Dash Stamina by wltr3565 Empty2012-05-07, 16:05

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:
Kembali Ke Atas Go down
yade26
Novice
Novice
yade26


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

Error Dash Stamina by wltr3565 Empty
PostSubyek: Re: Error Dash Stamina by wltr3565   Error Dash Stamina by wltr3565 Empty2012-05-07, 19:22

Ma'af... trnyata udh ketemu bugnya dan udah ane fix... :clap:
thx buat bantuan kalian... :)

Mod, udah solved nih... di lock ja...
Kembali Ke Atas Go down
http://medlayerz.blogspot.com
Sponsored content





Error Dash Stamina by wltr3565 Empty
PostSubyek: Re: Error Dash Stamina by wltr3565   Error Dash Stamina by wltr3565 Empty

Kembali Ke Atas Go down
 
Error Dash Stamina by wltr3565
Kembali Ke Atas 
Halaman 1 dari 1
 Similar topics
-
» Tentang Dash menggunakan limit Stamina
» [ERROR] Error pada Item Variable
» wltr3565's art scrappile
»  edit wltr3565's Burst Gauge v1.9b
» [ASK] Stamina System

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