How to push method content in text?

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
Hi people I worked on my AI for the pre-implemented text module so I encounter a problem I was not sure how to fix

so here the way normally you call text

call_dialogues(buy_goods_dialogues)if you go see in the module for hte buy good dialogues it's simply that : 

#----------------------------------------------------------------------------# ○ new method: vendor_graphics#---------------------------------------------------------------------------- def self.vendor_graphics @vendor_graphics = default_AI[:vendor_graphics]end#----------------------------------------------------------------------------# ○ new method: greeting#---------------------------------------------------------------------------- def self.greeting @greeting = default_AI[:greeting_dialogues] end#----------------------------------------------------------------------------# ○ new method: goodbye#---------------------------------------------------------------------------- def self.goodbye @goodbye = default_AI[:goodbye_dialogues] end#----------------------------------------------------------------------------# ○ new method: buy_goods_dialogues#---------------------------------------------------------------------------- def self.buy_goods_dialogues @buy_goods_dialogues = default_AI[:buy_goods_dialogues] end#----------------------------------------------------------------------------# ○ new method: sell_goods_dialogues#---------------------------------------------------------------------------- def self.sell_goods_dialogues @sell_goods_dialogues = default_AI[:sell_goods_dialogues] end#----------------------------------------------------------------------------# ○ new method: not_buying_dialogues#---------------------------------------------------------------------------- def self.not_buying_dialogues @not_buying_dialogues = default_AI[:not_buying_dialogues] end#----------------------------------------------------------------------------# ○ new method: not_selling_dialogues#---------------------------------------------------------------------------- def self.not_selling_dialogues @not_selling_dialogues = default_AI[:not_selling_dialogues] endbut at this moment I am not sure how to make  my method call_dialogues to recognize the method when you put them into parentheses...

mostly the message system would be a child class of window_message but I am a little block on this part ...if you have better idea to suggest me HOW to create the message system I would gladly accept them :/

but take in note I want to make it easy to people to use and less time com summing 
 
Last edited by a moderator:

Josephkhland

Extremely Hardfork
Veteran
Joined
May 20, 2015
Messages
140
Reaction score
17
First Language
Greek
Primarily Uses
RMVXA
Can't you define the call_dialogues method with an argument

Like this

def call_dialogues(argument_name)

dialogue = argument_name

if dialogue == "greeting_dialogues"

self.greetings

elsif ....

...

end

end

I don't know of it will work since I am still a beginner but either way . I hope I helped
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,949
Reaction score
3,042
First Language
French
Primarily Uses
RMMV
Can't you define the call_dialogues method with an argument

Like this

def call_dialogues(argument_name)

dialogue = argument_name

if dialogue == "greeting_dialogues"

self.greetings

elsif ....

...

end

end

I don't know of it will work since I am still a beginner but either way . I hope I helped
no no actually if you check in game message you can see that way : 

def self.call_dialogues(dialogues) @dialogues.push(dialogues) endbut thanks to try to help me out :)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,863
Messages
1,017,053
Members
137,571
Latest member
grr
Top