The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > thor348
Reload this Page Conversation Between thor348 and Maruno
Sign Up Rules/FAQ Daily Battle Blogs Mark Forums Read


Conversation Between thor348 and Maruno
Showing Visitor Messages 1 to 3 of 3
  1. thor348
    November 17th, 2012 1:52 PM
    thor348
    it's pry cause i made it for rpg maker xp rather than pokemon essentials. thanks
  2. thor348
    November 17th, 2012 5:21 AM
    thor348
    here is my error message:

    Interpreter:276:in `pbExecuteScript'
    Interpreter:788:in `command_111'
    Interpreter:320:in `execute_command'
    Interpreter:193:in `update'
    Interpreter:106:in `loop'
    Interpreter:198:in `update'
    Scene_Map:103:in `update'
    Scene_Map:101:in `loop'
    Scene_Map:114:in `update'
    Scene_Map:68:in `main'
    Exception: NoMethodError
    Message: undefined method `saved_index' for #<Game_System:0x819bc20>
    Scene_SketchBookin `main'
    Main:37:in `mainFunctionDebug'
    Mainin `mainFunction'
    Mainin `pbCriticalCode'
    Mainin `mainFunction'
    Main:47
    Main:46:in `loop'
    Main:55
  3. thor348
    November 17th, 2012 5:20 AM
    thor348
    i wrote a script for my pokemon game in which i'm using your most current pokemon essentials for.
    but it is not working? please take a look at it and help if you can. its just a simple sketch pad for in game. i have the pictures in my graphics folder for it as well.
    _________________________

    class Scene_SketchBook

    Book_Instruction = '[X] Erase [C] OK'
    Sketch_Folder = 'Sketch'

    def main
    index = $game_system.saved_index || 1
    draw_content
    draw_index
    draw_gesture
    Graphics.transition
    while $scene == self
    [Graphics,Input].each {|s| s.update}
    update_book
    end
    Graphics.freeze
    @all_sprite.compact.each {|i| i.dispose}
    end

    def draw_content
    @all_sprite = [ @spriteset = Spriteset_Map.new,
    @sprite_book = Sprite.new,
    @sprite_gesture = Sprite.new,
    @sprite_text = Sprite.new,]
    @sprite_book.bitmap = RPG::Cache.picture('book')
    @sprite_gesture.bitmap = Bitmap.new (540,440)
    @sprite_text.bitmap = Bitmap.new (540,440)
    @sprite_gesture.x = @sprite_text.x = 50
    @sprite_gesture.y = @sprite_text.y = 20
    @sprite_gesture.z = @sprite_book.z + 1
    end

    def draw_index
    index = $game_system.saved_index || 1
    @sprite_text.bitmap.fill_rect(0,410-15,540,32+15,Color.new(0,0,0,0))
    @sprite_text.bitmap.font.name = ['Comic Sans MS', 'Arial']
    @sprite_text.bitmap.font.size = 17
    @sprite_text.bitmap.font.color = Color.new(0,0,0)
    @sprite_text.bitmap.draw_text(15,410,270,32,"Page #{index*2-1}",0)
    @sprite_text.bitmap.draw_text(270-10,410,270,32,"Page #{index*2}",2)
    @sprite_text.bitmap.draw_text(15,410-15,270,32,"<< Q",0) if index > min_index
    @sprite_text.bitmap.draw_text(270-10,410-15,270,32,"W >>",2) if index < max_index
    @sprite_text.bitmap.draw_text(15,410,270-15,32,Book_Instruction,2)
    end

    def draw_gesture
    index = $game_system.saved_index || 1
    $game_temp.saved_gesture = {} if !$game_temp.saved_gesture
    @sprite_gesture.bitmap.clear
    if FileTest.exist?(sprintf(Sketch_Folder+"/Sk%03d.png", index))
    @sprite_gesture.bitmap = Bitmap.new(
    sprintf(Sketch_Folder+"/Sk%03d.png", index))
    elsif $game_temp.saved_gesture[index]
    @sprite_gesture.bitmap.blt(0,0,$game_temp.saved_gesture[index],
    $game_temp.saved_gesture[index].rect)
    end
    end

    def min_index() 1 end
    def max_index() 20 end

    def update_book
    update_input
    update_mouse_gestures if $drago_mouse_gestures
    end

    def update_input
    return input_ok if Input.trigger?(Input::C)
    input_hapus if Input.trigger?(Input::B)
    input_prevpage if Input.trigger?(Input::L)
    input_nextpage if Input.trigger?(Input::R)
    end

    def input_hapus
    $game_system.se_play($data_system.cancel_se)
    clear_current_page
    end

    def input_ok
    $game_system.se_play($data_system.decision_se)
    $scene = Scene_Map.new
    end

    def input_prevpage
    if index > min_index
    Audio.se_play('Audio/SE/046-Book01', 100, 100)
    $game_system.saved_index = ($game_system.saved_index || 1) - 1
    draw_index
    draw_gesture
    end
    end

    def input_nextpage
    if index < max_index
    Audio.se_play('Audio/SE/046-Book01', 100, 100)
    $game_system.saved_index = ($game_system.saved_index || 1) + 1
    draw_index
    draw_gesture
    end
    end

    def clear_current_page
    @sprite_gesture.bitmap.clear
    index = ($game_system.saved_index || 1).abs
    $game_temp.saved_gesture[index] = nil
    $game_temp.saved_gesture[index.to_s] = []
    if FileTest.exist?(sprintf(Sketch_Folder+"/Sk%03d.png", index))
    File.delete(sprintf(Sketch_Folder+"/Sk%03d.png", index))
    end
    end

    alias drg_143_sges save_gesture unless method_defined?(:drg_143_sges) ||
    !method_defined?(:save_gesture)
    def save_gesture
    drg_143_sges
    index = $game_system.saved_index || 1
    if $game_temp.saved_gesture[index]
    @sprite_gesture.bitmap.blt(-50,-20,$game_temp.saved_gesture[index],
    $game_temp.saved_gesture[index].rect)
    end
    $game_temp.saved_gesture[index] = @sprite_gesture.bitmap.clone
    Dir.mkdir(Sketch_Folder) unless File.directory?(Sketch_Folder)
    @sprite_gesture.bitmap.make_png(sprintf(Sketch_Folder+"/Sk%03d", index))
    end


    end

All times are GMT -8. The time now is 1:56 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2016 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2016.