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.

[Resolved] How do I make this shorter?

Status
Not open for further replies.
$game_crafting.learn_item_recipe(item_id)

sometimes whenever I paste such a thing in a script dialog window it looks like this:
$game_crafting.learn_item_recipe
(item_id)

well I admit this is still a very short example, since SephirothSpawn likes lo use these kind of things quite a lot, including even his nickname partially.
oh, by the way, is it just a variable? or is there a more specific name for this thing? I want to really understand what it is.
 

arev

Sponsor

A clean and handy method to overcome the problem with long expressions in the dialog window is to put them in the Interpreter class. If there are multiple commands you'd like to put there it's best to create a new tab for the interpreter (under Interpreter7).
Code:
class Interpreter

  def learn_recipe(item_id)
    return $game_crafting.learn_item_recipe(item_id)
  end

end
With this you onle type "learn_recipe(item_id)" in the dialog box.
 
Interesting. Well thank you, arevulopapo, you helped me a lot.
but... where is the Interpreter7?
Edit:
Anyway, I pasted this expression in a new script as a stand-alone script and it is working fine.
Thank you, man!
 
Status
Not open for further replies.

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