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.
|
|
| [SOLVED] scripter help me! (masuk dulu, liat dulu) | |
| 2012-04-06, 18:26 | [SOLVED] scripter help me! (masuk dulu, liat dulu) |
---|
RolandMelvinZ Novice
Posts : 294 Thanked : 3 Engine : RMXP Skill : Beginner Type : Composer
| Nah jadi begini... saya sedang belajar scripting dengan mengikuti tuts nya dubealex.. dan saya sampai d lesson untuk membuat menu sederhana.. saya baca dan ikuti tutorial yang ada.. akhirnya setelah selesai menulis script sesuai panduan, saya mau melihat hasil akhir.. pencet F12 masih bisa.. tp begitu jalan ke event yang ud d kasi perintah call script "$Scene=Scene_Chapter_2.new" malah error :hammer:tulisannya "Script 'Windows_1' line 17: NameError occured. uninitialized constant Window_1::Graphic" Ada yang taw apa yang salah :hammer:berikut script yang aku pke. Window_1 - Code:
-
class Window_1 < Window_Base def initialize super(0, 0, 640, 100) self.contents = Bitmap.new(width-32,height-32) self.contents.font.name= "Arial" self.contents.font.size= 24 refresh end
def refresh self.contents.clear self.contents.font.color = text_color(6) self.contents.draw_text(0, 0, 100, 32, "PLAYTIME:") #=============================================================================== #code to show PLAYTIME #=============================================================================== @total_sec = Graphics.frame_count / Graphic.frame_rate hour = @total_sec / 60 / 60 min = @total_sec / 60 % 60 sec = @total_sec % 60 text = sprintf("%02d:%02d:%02d", hour, min, sec)
#=============================================================================== #end of code to show PLAYTIME #===============================================================================
self.contents.font.color = text_color(6) self.contents.draw_text(250, 0, 120, 32, "Gold:") self.contents.font.color = text_color(0) self.contents.draw_text(305, 0, 120, 32, $game_party.gold.to_s) self.contents.font.color = text_color(6) self.contents.draw_text(400, 0, 120, 32, "Map:") self.contents.font.color = text_color(0) self.contents.draw_text(480, 0, 120, 32, $game_map.mapid.to_s) end def update if Graphics.frame_count / Graphics.frame_rate != @total_sec refresh end end end WIndow_2 - Code:
-
class Window_2 < Window_Base #BLOCK 1 def initialize super(0, 0, 200,380) self.contents = Bitmap.new(width-32, height-32) self.contents.font.name = "Arial" self.contents.font.size = 24
#BLOCK 2 for i in 0...$game_party.actors.size x = 0 y = i * 90 actor = $game_party.actors self.contents.font.color = text_color(6) self.contents.draw_text(x, y, 200, 32, $game_party.actors.name) self.contents.font.color = text_color(4) self.contents.draw_text(x, y+32, 200, 32, actor.class_name) end end end Window_3 - Code:
-
class Window_3 < Window_Base #BLOCK 1 def initialize super(0, 0, 440,380) self.contents = Bitmap.new(width-32, height-32) self.contents.font.name = "Arial" self.contents.font.size = 24 #BLOCK 2 for i in 0...$game_party.actors.size x = 0 y = i * 150 if i >= 2 x=250 y -= 300 end
actor = $game_party.actors self.contents.font.color = text_color(6) self.contents.draw_text(x, y, 200, 32, actor.name) offset_x=contents.text_size(actor.name).width+10 self.contents.font.color = text_color(4) self.contents.draw_text(x+offset_x, y, 200, 32, "Lv: " + actor.level.to_s) draw_actor_hp(actor, x, y+32) draw_actor_sp(actor, x, y+64) draw_actor_exp(actor, x, y+96) end end end Scene_Chapter_2 - Code:
-
class Scene_Chapter_2 #BLOCK 1 def main @window_1=Window_1.new @window_2=Window_2.new @window_2.y=100 @window_3=Window_3.new @window_3.x=200 @window_3.y=100 #BLOCK 2 Graphics.transition loop do Graphics.update Input.update update if $scene != self break end
end
#BLOCK 3 Graphics.freeze @window_1.dispose @window_2.dispose @window_3.dispose end #BLOCK 4 def update @window_1.update if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) $scene = Scene_Map.new end
end end |
| | | 2012-04-06, 19:05 | Re: [SOLVED] scripter help me! (masuk dulu, liat dulu) |
---|
wltr3565 Senior
Posts : 870 Thanked : 28 Engine : RMVX Skill : Skilled Type : Scripter
Awards:
| Graphic... Mana ada Graphic? Adanya Graphics. |
| | | 2012-04-06, 19:12 | Re: [SOLVED] scripter help me! (masuk dulu, liat dulu) |
---|
RolandMelvinZ Novice
Posts : 294 Thanked : 3 Engine : RMXP Skill : Beginner Type : Composer
| oh salah tulis *jedueng ok makasi close this trid plis Edited by Theo: DAFUQ jawabannya faceplam banget *Locked* |
| | | | Re: [SOLVED] scripter help me! (masuk dulu, liat dulu) |
---|
Sponsored content
| | | | | [SOLVED] scripter help me! (masuk dulu, liat dulu) | |
|
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 ]
|
|
|
|
|
|