Chaos Project

RPG Maker => RPG Maker Scripts => Topic started by: Ryex on May 10, 2009, 11:21:31 pm

Title: [Resolved]How to create this config
Post by: Ryex on May 10, 2009, 11:21:31 pm
I making a script and you need to set up weapons like so in the config

$data_weapons[1].bla = 7
$data_weapons[1].otherbla = true

my question is what class/module
would I have this in so that it works?

Game_System?
Module RPG?
I'm not sure

thanks for the help
Title: Re: How to creat this config
Post by: Aqua on May 10, 2009, 11:24:34 pm
You can put that virtually anywhere.
I think... :P
Title: Re: How to create this config
Post by: Ryex on May 10, 2009, 11:27:59 pm
you sure?
Title: Re: How to create this config
Post by: G_G on May 11, 2009, 12:06:28 am
Quote from: Ryexander on May 10, 2009, 11:21:31 pm
I making a script and you need to set up weapons like so in the config

$data_weapons[1].bla = 7
$data_weapons[1].otherbla = true

my question is what class/module
would I have this in so that it works?

Game_System?
Module RPG?
I'm not sure

thanks for the help


Make a new slot for script whatever and do this

module RPG
  class Weapon
    def bla
      case id
      when weapon id then return true/false/number
      end
      return true/false/number
    end
  end
end


Than to call it you use
$data_weapons
Title: Re: How to create this config
Post by: Ryex on May 11, 2009, 12:09:43 am
Not what I was Asking G_G but Resolved anyway.