Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

cardgame battle system

mor

Member

Hi
I want to create something like Legened of Super Saiyan....
I have written some scripts by now I'm stuck
http://img174.imageshack.us/img174/8405/screenqd8.png[/IMG]
Code:
class Scene_Map
  
  alias raz_cos_main main
  alias raz_cos_update update
  
  def main
    raz_cos_main
    @cos_window.dispose
    @cos_dummy[0].dispose
    end  
  def update
  if @size != $game_party.actors.size
     @cos_window.refresh
      show_windows
    end
  if @cos == true
      else
    main_windows
  end
  
    @cos_window.update
    raz_cos_update
  end
  
  def show_windows
    if $game_party.actors[0] == nil
      @cos_dummy[0].visible = false
      else
      @cos_dummy[0].visible = true
    end
  end
  
  def main_windows
    @opacity = 200
    @cos_dummy = []
    @cos_dummy[0] = Window_Base.new(160, 372,480, 108)
    @cos_dummy[0].opacity = @opacity
    @cos_window = Window_COS.new
    if $game_party.actors[0] == nil
      @cos_dummy[0].visible = false
      else
      @cos_dummy[0].visible = true
    end
    
    @cos = true
    end
 #============================================================== 
  def turn_cos_off
    @cos_window.visible, @cos_dummy[0].visible = false, false
    Audio.bgm_stop
    return
  end

#================================================================
  def turn_cos_on
    @cos_window.visible, @cos_dummy[0].visible = true, true
    $game_system.bgm_play($data_system.battle_bgm)
    return
  end
end

#=================================================================
class Window_COS < Window_Base
 def initialize
    super(0, 0, 800, 600)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.opacity = 0
    
    refresh
  end
  
  def refresh
    self.contents.clear
    x=155
    for i in 1 ... 6
      k=rand(5)+1
     self.contents.blt(x, 363, RPG::Cache.picture("#{k}.jpg"), Rect.new(0,0,61,94), 255)
     x=x+66
    end
  end
  
end
and this is my code... its only showing window and cards...
the next step in my game should be script to choose cards etc but I dont know how to do it:) please help me (write for me these scripts:D:D.. Im jokking... just show me the way to write those scripts:))

Sorry for my english':|':|
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top